Search in sources :

Example 26 with MainView

use of org.freeplane.view.swing.map.MainView in project freeplane by freeplane.

the class ExternalImagePopupMenu method maybeShowPopup.

protected void maybeShowPopup(final MouseEvent e) {
    MainView mv = null;
    if (e.isPopupTrigger()) {
        for (final Component cmp : e.getComponent().getParent().getComponents()) {
            if (cmp instanceof MainView) {
                mv = (MainView) cmp;
                node = mv.getNodeView().getModel();
                viewer = (Controller.getCurrentController().getModeController().getExtension(ViewerController.class));
                break;
            }
        }
        make();
        show(e.getComponent(), e.getX(), e.getY());
    }
}
Also used : MainView(org.freeplane.view.swing.map.MainView) Component(java.awt.Component)

Aggregations

MainView (org.freeplane.view.swing.map.MainView)26 NodeView (org.freeplane.view.swing.map.NodeView)11 NodeModel (org.freeplane.features.map.NodeModel)10 ModeController (org.freeplane.features.mode.ModeController)9 MapView (org.freeplane.view.swing.map.MapView)9 Point (java.awt.Point)7 MapController (org.freeplane.features.map.MapController)6 Controller (org.freeplane.features.mode.Controller)5 Component (java.awt.Component)4 ResourceController (org.freeplane.core.resources.ResourceController)4 MMapController (org.freeplane.features.map.mindmapmode.MMapController)4 Dimension (java.awt.Dimension)3 Rectangle (java.awt.Rectangle)3 MTextController (org.freeplane.features.text.mindmapmode.MTextController)3 Color (java.awt.Color)2 Cursor (java.awt.Cursor)2 Transferable (java.awt.datatransfer.Transferable)2 JPopupMenu (javax.swing.JPopupMenu)2 LinkController (org.freeplane.features.link.LinkController)2 LocationController (org.freeplane.features.nodelocation.LocationController)2