Examples of IMapViewManager


Examples of org.freeplane.features.ui.IMapViewManager

    return getDelegate().getFile();
  }

  // MapRO: R
  public String getName() {
    final IMapViewManager mapViewManager = getMapViewManager();
    for (Entry<String, MapModel> map : mapViewManager.getMaps().entrySet()) {
      if (map.getValue().equals(getDelegate()))
        return map.getKey();
    }
    return null;
  }
View Full Code Here

Examples of org.freeplane.features.ui.IMapViewManager

  // Map: R/W
  public boolean close(boolean force, boolean allowInteraction) {
    if (!getDelegate().isSaved() && !force && !allowInteraction)
      throw new RuntimeException("will not close an unsaved map without being told so");
    final IMapViewManager mapViewManager = getMapViewManager();
    changeToThisMap(mapViewManager);
    return mapViewManager.close(force);
  }
View Full Code Here

Examples of org.freeplane.features.ui.IMapViewManager

  public void afterViewChange(final Component oldView, final Component newView) {
    if (newView == null) {
      return;
    }
    final IMapViewManager mapViewManager = Controller.getCurrentController().getMapViewManager();
    mapViewManager.getModeController(newView);
    final MapModel map = mapViewManager.getModel(newView);
    final URL url = map.getURL();
    if (url == null) {
      return;
    }
    setURLField(url.toString());
View Full Code Here

Examples of org.freeplane.features.ui.IMapViewManager

   * generated.instance.XmlAction)
   */
  public void actionPerformed(final ActionEvent arg0) {
    final Controller controller = Controller.getCurrentController();
    final NodeModel nodeModel = controller.getSelection().getSelected();
    final IMapViewManager viewController = controller.getMapViewManager();
    final Component node = viewController.getComponent(nodeModel);
    node.requestFocus();
    edit(nodeModel);
  }
View Full Code Here

Examples of org.freeplane.features.ui.IMapViewManager

  public Map newMap(URL url) {
    try {
      final MapModel oldMap = Controller.getCurrentController().getMap();
      Controller.getCurrentModeController().getMapController().newMap(url);
      final IMapViewManager mapViewManager = Controller.getCurrentController().getMapViewManager();
      final String key = mapViewManager.checkIfFileIsAlreadyOpened(url);
      // make the map the current map even if it was already opened
      if (key == null || !mapViewManager.tryToChangeToMapView(key))
        throw new RuntimeException("map " + url + " does not seem to be opened");
      final MapModel newMap = mapViewManager.getModel();
      restartTransaction(oldMap, newMap);
      return new MapProxy(newMap, scriptContext);
    }
    catch (Exception e) {
      throw new RuntimeException("error on newMap", e);
View Full Code Here

Examples of org.freeplane.features.ui.IMapViewManager

  public static void setDialogLocationRelativeTo(final JDialog dialog,
                                                 final NodeModel node) {
    if (node == null) {
      return;
    }
    final IMapViewManager viewController = Controller.getCurrentController().getMapViewManager();
    viewController.scrollNodeToVisible(node);
    final Component c = viewController.getComponent(node);
    UITools.setDialogLocationRelativeTo(dialog, c);
  }
View Full Code Here

Examples of org.freeplane.features.ui.IMapViewManager

    UITools.setDialogLocationRelativeTo(dialog, c);
  }

  public static void setDialogLocationUnder(final JDialog dialog, final NodeModel node) {
    final Controller controller = Controller.getCurrentController();
    final IMapViewManager viewController = controller.getMapViewManager();
    final JComponent c = (JComponent) viewController.getComponent(node);
    final int x = 0;
    final int y = c.getHeight();
    final Point location = new Point(x, y);
    SwingUtilities.convertPointToScreen(location, c);
    UITools.setBounds(dialog, location.x, location.y, dialog.getWidth(), dialog.getHeight());
View Full Code Here

Examples of org.freeplane.features.ui.IMapViewManager

    JOptionPane.showMessageDialog(getFrame(), scrollPane, "Freeplane", messageType);
  }
  public static int showConfirmDialog(final NodeModel node, final Object message, final String title,
                                      final int optionType, final int messageType) {
    final Controller controller = Controller.getCurrentController();
    final IMapViewManager viewController = controller.getMapViewManager();
    final Component parentComponent;
    if (node == null) {
      parentComponent = getFrame();
    }
    else {
      viewController.scrollNodeToVisible(node);
      parentComponent = viewController.getComponent(node);
    }
    return JOptionPane.showConfirmDialog(parentComponent, message, title, optionType, messageType);
  }
View Full Code Here

Examples of org.freeplane.features.ui.IMapViewManager

                                       final String initialValue) {
    if (node == null) {
      return null;
    }
    final Controller controller = Controller.getCurrentController();
    final IMapViewManager viewController = controller.getMapViewManager();
    viewController.scrollNodeToVisible(node);
    final Component parentComponent = viewController.getComponent(node);
    return JOptionPane.showInputDialog(parentComponent, message, initialValue);
  }
View Full Code Here

Examples of org.freeplane.features.ui.IMapViewManager

                                       final String title, final int type) {
    if (node == null) {
      return null;
    }
    final Controller controller = Controller.getCurrentController();
    final IMapViewManager viewController = controller.getMapViewManager();
    viewController.scrollNodeToVisible(node);
    final Component parentComponent = viewController.getComponent(node);
    return JOptionPane.showInputDialog(parentComponent, text, title, type);
  }
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.