Tabnine Logo
Controller.getMapViewManager
Code IndexAdd Tabnine to your IDE (free)

How to use
getMapViewManager
method
in
org.freeplane.features.mode.Controller

Best Java code snippets using org.freeplane.features.mode.Controller.getMapViewManager (Showing top 20 results out of 315)

origin: freeplane/freeplane

/**
 * @return
 */
public MapModel getMap() {
  return getMapViewManager().getModel();
}
origin: freeplane/freeplane

/**
 * @param create_image
 */
private String getAreaCode(final boolean create_image) {
  String areaCode = "";
  if (create_image) {
    areaCode = Controller.getCurrentController().getMapViewManager().createHtmlMap();
  }
  return areaCode;
}
origin: freeplane/freeplane

private void selectMap(final MapModel map) {
  if (map.equals(Controller.getCurrentController().getMap())) {
    return;
  }
  final IMapViewManager mapViewManager = Controller.getCurrentController().getMapViewManager();
  final Map<String, MapModel> maps = mapViewManager.getMaps(MModeController.MODENAME);
  for (final Map.Entry<String, MapModel> entry : maps.entrySet()) {
    if (map.equals(entry.getValue())) {
      mapViewManager.tryToChangeToMapView(entry.getKey());
    }
  }
}
origin: freeplane/freeplane

public void actionPerformed(final ActionEvent e) {
  view = (MapView) Controller.getCurrentController().getMapViewManager().getMapViewComponent();
  if (view == null) {
    return;
  }
  zoom();
  EventQueue.invokeLater(new Runnable() {
    public void run() {
      scroll();
    }
  });
}
origin: freeplane/freeplane

public static String showInputDialog( final NodeModel node, final String message,
                   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);
}
origin: freeplane/freeplane

public static String showInputDialog( final NodeModel node, final String text,
                   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);
}
origin: freeplane/freeplane

public RenderedImage createBufferedImage(MapModel map, final Dimension slideSize, NodeModel placedNode, NodePosition placedNodePosition) {
  final Controller controller = Controller.getCurrentController();
  if(! map.equals(controller.getMap())) {
    return null;
  }
  return controller.getMapViewManager().createImage(slideSize, placedNode, placedNodePosition, imageResolutionInDpi);
}
origin: freeplane/freeplane

@Override
public void windowClosing(DockingWindow window) throws OperationAbortedException {
  for(Component mapViewComponent : mapViews.toArray(new Component[]{}))
    if(SwingUtilities.isDescendingFrom(mapViewComponent, window))
    if (!Controller.getCurrentController().getMapViewManager().close(mapViewComponent))
      throw new OperationAbortedException("can not close view");
}
origin: freeplane/freeplane

/**
 */
private int getNodeShiftYChange(final Point dragNextPoint, final NodeModel node) {
  final Controller controller = Controller.getCurrentController();
  final MapView mapView = ((MapView) controller.getMapViewManager().getMapViewComponent());
  final int shiftYChange = (int) ((dragNextPoint.y - dragStartingPoint.y) / mapView.getZoom());
  return shiftYChange;
}
origin: freeplane/freeplane

private boolean tryToChangeToMapView(URL url) {
  try {
    return Controller.getCurrentController().getMapViewManager().tryToChangeToMapView(url);
  } catch (MalformedURLException e) {
    LogUtils.warn(e);
    return false;
  }
}
origin: freeplane/freeplane

  private void repaintMap() {
    final Component mapViewComponent = Controller.getCurrentController().getMapViewManager().getMapViewComponent();
    if(mapViewComponent != null)
      mapViewComponent.repaint();
  }
}
origin: freeplane/freeplane

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());
}
origin: freeplane/freeplane

  @Override
  public void ancestorRemoved(final AncestorEvent event) {
    final Component selectedComponent = Controller.getCurrentController().getMapViewManager().getSelectedComponent();
    if(selectedComponent != null)
      selectedComponent.requestFocusInWindow();
    quickEditor.removeAncestorListener(this);
  }
});
origin: freeplane/freeplane

public void stopPresentation() {
  if (currentSlide != null) {
    currentSlide = null;
    firePresentationStateChangedEvent(PLAYING_STATE_CHANGED);
    Slide.ALL_NODES.apply(1f);
    if(usesMapZoom())
      Controller.getCurrentController().getMapViewManager().setZoom(zoomFactor);
    zoomFactor = 1f;
  }
}

origin: freeplane/freeplane

public void select(final NodeModel node) {
  final MapModel map = node.getMap();
  final Controller controller = Controller.getCurrentController();
  if (! map.equals(controller.getMap())){
    controller.getMapViewManager().changeToMap(map);
  }
  displayNode(node);
  controller.getSelection().selectAsTheOnlyOneSelected(node);
}
origin: freeplane/freeplane

  private AFilterComposerDialog getFilterDialog() {
    if (filterDialog == null) {
      filterDialog = new FilterComposerDialog();
      getFilterDialog().setLocationRelativeTo(filterController.getFilterToolbar());
      Controller.getCurrentController().getMapViewManager().addMapSelectionListener(filterDialog);
    }
    return filterDialog;
  }
}
origin: freeplane/freeplane

  @Override
  void setStyleOnExternalChange(NodeModel node) {
    final NodeStyleController styleController = NodeStyleController.getController();
    final Color color = NodeStyleModel.getBackgroundColor(node);
    final Color viewColor = styleController.getBackgroundColor(node);
    mSetNodeBackgroundColor.setValue(color != null);
    mNodeBackgroundColor.setColorValue(viewColor != null ? viewColor : Controller.getCurrentController()
      .getMapViewManager().getBackgroundColor(node));
  }
}
origin: freeplane/freeplane

  @Override
  public void startup() {
    final Controller controller = getController();
    controller.getMapViewManager().changeToMode(MODENAME);
    if (controller.getMap() == null) {
      ((FMapController) getMapController()).newMap(File.listRoots());
    }
    super.startup();
  }
}
origin: freeplane/freeplane

@Override
public void actionPerformed(final ActionEvent e) {
  setShortened = !isShortened();
  final Controller controller = Controller.getCurrentController();
  final IMapSelection selection = controller.getSelection();
  final NodeModel node = selection.getSelected();
  controller.getMapViewManager().getComponent(node).requestFocusInWindow();
  selection.keepNodePosition(node, 0.0f, 0.0f);
  super.actionPerformed(e);
}

origin: freeplane/freeplane

@Override
public void setSaved(final MapModel mapModel, final boolean saved) {
  final boolean setTitle = saved != mapModel.isSaved() || mapModel.isReadOnly();
  mapModel.setSaved(saved);
  if (setTitle) {
    final Controller controller = Controller.getCurrentController();
    controller.getMapViewManager().setMapTitles();
    final AFreeplaneAction saveAction = controller.getModeController().getAction("SaveAction");
    if(saveAction != null)
      saveAction.setEnabled();
  }
}
org.freeplane.features.modeControllergetMapViewManager

Popular methods of Controller

  • getCurrentController
  • getCurrentModeController
  • getMap
  • getModeController
  • getViewController
  • getResourceController
  • getSelection
  • addApplicationLifecycleListener
  • addOptionValidator
  • getExtension
  • <init>
  • addAction
  • <init>,
  • addAction,
  • addActionIfNotAlreadySet,
  • addExtension,
  • addMapLifeCycleListener,
  • addModeController,
  • close,
  • closeAllMaps,
  • exec

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getResourceAsStream (ClassLoader)
  • onRequestPermissionsResult (Fragment)
  • setScale (BigDecimal)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • BoxLayout (javax.swing)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now