Package org.freeplane.features.map.mindmapmode

Examples of org.freeplane.features.map.mindmapmode.MMapController.moveNode()


      MMapController mapController = (MMapController) modeController.getMapController();
      if (selectedsBackup == null) {
        final Collection<NodeModel> selecteds = mapController.getSelectedNodes();
        selectedsBackup = selecteds.toArray(new NodeModel[selecteds.size()]);
      }
      mapController.moveNode(node, node.getParentNode(), newIndex, isLeft, false);
    }
    return selectedsBackup;
  }

  public int getRefX(final NodeView node) {
View Full Code Here


  public void moveTo(final Proxy.Node parentNodeProxy, final int position) {
        final NodeModel parentNode = ((NodeProxy) parentNodeProxy).getDelegate();
        final NodeModel movedNode = getDelegate();
    final MMapController mapController = (MMapController) getModeController().getMapController();
    ((FreeNode)Controller.getCurrentModeController().getExtension(FreeNode.class)).undoableDeactivateHook(movedNode);
    mapController.moveNode(movedNode, parentNode, position, getDelegate().isLeft(), parentNode.isLeft() != movedNode.isLeft());
  }

  // Node: R/W
  public void removeConnector(final Proxy.Connector connectorToBeRemoved) {
    final ConnectorProxy connectorProxy = (ConnectorProxy) connectorToBeRemoved;
View Full Code Here

      final boolean isHtmlNode = HtmlUtils.isHtmlNode(nodeContent);
      joinedContent = addContent(joinedContent, isHtml, nodeContent, isHtmlNode);
      if (node != selectedNode) {
        final MMapController mapController = (MMapController) Controller.getCurrentModeController().getMapController();
        for(final NodeModel child: node.getChildren().toArray(new NodeModel[]{})){
          mapController.moveNode(child, selectedNode, selectedNode.getChildCount());
        }
        mapController.deleteNode(node);
      }
      isHtml = isHtml || isHtmlNode;
    }
View Full Code Here

    Collections.sort(sortVector, new NodeTextComparator());
    final MMapController mapController = (MMapController) Controller.getCurrentModeController().getMapController();
    int i = 0;
    for (final NodeModel child : sortVector) {
      ((FreeNode)Controller.getCurrentModeController().getExtension(FreeNode.class)).undoableDeactivateHook(child);
      mapController.moveNode(child, node, i++);
    }
  }
}
View Full Code Here

    final NodeModel[] selecteds = getSelectedNodes();
    ((MLocationController)LocationController.getController()).moveNodePosition(node, -1, LocationModel.HGAP, 0);
    super.undoableToggleHook(node, extension);
    if(isFreeNode(node)){
      MMapController mapController = (MMapController) Controller.getCurrentModeController().getMapController();
      mapController.moveNode(node, 0);
    }
    Controller.getCurrentController().getSelection().replaceSelection(selecteds);
  }

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.