Package org.freeplane.features.map

Examples of org.freeplane.features.map.IMapSelection


  public CenterSelectedNodeAction() {
    super("CenterSelectedNodeAction");
  }

  public void actionPerformed(final ActionEvent e) {
    final IMapSelection selection = Controller.getCurrentController().getSelection();
    final Component mapView = Controller.getCurrentController().getMapViewManager().getMapViewComponent();
    final JRootPane rootPane = SwingUtilities.getRootPane(mapView);
    if (!rootPane.isValid()) {
      rootPane.revalidate();
    }
    selection.centerNode(selection.getSelected());
  }
View Full Code Here


  public void actionPerformed(final ActionEvent e) {
    checkDetailsEnabled();
    if(! foundDetails)
      return;
    isHidden = !isHidden;
    final IMapSelection selection = Controller.getCurrentController().getSelection();
    selection.keepNodePosition(selection.getSelected(), 0.0f, 0.0f);
    super.actionPerformed(e);
  }
View Full Code Here

  }

  public void actionPerformed(final ActionEvent e) {
    final Controller controller = Controller.getCurrentController();
    final ModeController modeController = Controller.getCurrentModeController();
    final IMapSelection selection = controller.getSelection();
    if (selection != null) {
      final ClipboardController clipboardController = (ClipboardController) modeController
          .getExtension(ClipboardController.class);
      final Transferable copy = clipboardController.copy(selection);
      if (copy != null) {
View Full Code Here

  }

  @Override
  public void actionPerformed(final ActionEvent e) {
    setShortened = !isShortened();
    final IMapSelection selection = Controller.getCurrentController().getSelection();
    selection.keepNodePosition(selection.getSelected(), 0.0f, 0.0f);
    super.actionPerformed(e);
  }
View Full Code Here

  private boolean check() {
    start = -1;
    end = -1;
    summaryLevel = -1;
      final ModeController modeController = Controller.getCurrentModeController();
    final IMapSelection selection = modeController.getController().getSelection();

    final List<NodeModel> sortedSelection = selection.getSortedSelection(false);
   
    final NodeModel firstNode = sortedSelection.get(0);
   
    final NodeModel parentNode = firstNode.getParentNode();
    // root node selected
View Full Code Here

  public void afterViewChange(final Component oldMap, final Component pNewMap) {
    Controller controller = Controller.getCurrentController();
    final ModeController oldModeController = controller.getModeController();
    ModeController newModeController = oldModeController;
    if (pNewMap != null) {
      final IMapSelection mapSelection = getMapSelection();
      final NodeModel selected = mapSelection.getSelected();
      mapSelection.scrollNodeToVisible(selected);
      setZoomComboBox(getZoom());
      obtainFocusForSelected();
      newModeController = getModeController(pNewMap);
      if (newModeController != oldModeController) {
        controller.selectMode(newModeController);
View Full Code Here

    }
  }

  @Override
  public void setEnabled() {
    final IMapSelection selection = Controller.getCurrentController().getSelection();
    setEnabled(selection != null && ! ShortenedTextModel.isShortened(selection.getSelected()));
  }
View Full Code Here

TOP

Related Classes of org.freeplane.features.map.IMapSelection

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.