Package mindnotes.client.ui.NodeLayout

Examples of mindnotes.client.ui.NodeLayout.LayoutPosition


  @Override
  public void onMove(DragContext context) {
    super.onMove(context);

    LayoutPosition position = findBestDropPosition(context);

    if (_position == null || !_position.equals(position)) {
      _mindMapWidget.holdLayout();
      // remove ghost from previous node
      if (_position != null) {
View Full Code Here


    int px = -_mindMapWidget.getLayoutOffsetX() + root.getOffsetX()
        + context.mouseX - panelLeft;
    int py = -_mindMapWidget.getLayoutOffsetY() + root.getOffsetY()
        + context.mouseY - panelTop;

    LayoutPosition position = NodeLayout.findClosestInsertPosition(root,
        px, py);
    while (!(position.parent instanceof NodeWidget)
        && position.parent != null) {
      LayoutTreeElement newParent = position.parent.getLayoutParent();
      position.index = newParent.getLayoutChildren().indexOf(
View Full Code Here

    MockLayoutTreeElement child = new MockLayoutTreeElement(0, 0, 200, 100,
        root, NodeLocation.LEFT);
    root.addChild(child);

    NodeLayout.doLayout(root);
    LayoutPosition position = NodeLayout.findClosestInsertPosition(root,
        110, -100);

    assertEquals(position.parent, root);
    assertEquals(NodeLocation.RIGHT, position.location);
View Full Code Here

TOP

Related Classes of mindnotes.client.ui.NodeLayout.LayoutPosition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.