Search in sources :

Example 11 with WorkspacePopupMenu

use of org.freeplane.plugin.workspace.components.menu.WorkspacePopupMenu in project freeplane by freeplane.

the class ProjectRootNode method initializePopup.

public void initializePopup() {
    if (popupMenu == null) {
        popupMenu = new WorkspacePopupMenu();
        WorkspacePopupMenuBuilder.addActions(popupMenu, new String[] { WorkspacePopupMenuBuilder.createSubMenu(TextUtils.getRawText("workspace.action.new.label")), "workspace.action.node.new.folder", "workspace.action.file.new.mindmap", WorkspacePopupMenuBuilder.endSubMenu(), WorkspacePopupMenuBuilder.SEPARATOR, "workspace.action.node.open.location", WorkspacePopupMenuBuilder.SEPARATOR, "workspace.action.node.cut", "workspace.action.node.copy", "workspace.action.node.paste", WorkspacePopupMenuBuilder.SEPARATOR, "workspace.action.node.rename", WorkspaceRemoveProjectAction.KEY, WorkspacePopupMenuBuilder.SEPARATOR, "workspace.action.node.refresh" });
    }
}
Also used : WorkspacePopupMenu(org.freeplane.plugin.workspace.components.menu.WorkspacePopupMenu)

Example 12 with WorkspacePopupMenu

use of org.freeplane.plugin.workspace.components.menu.WorkspacePopupMenu in project freeplane by freeplane.

the class AWorkspaceAction method getComponentFromActionEvent.

protected Component getComponentFromActionEvent(ActionEvent e) {
    // (WorkspacePopupMenu)((Component) e.getSource()).getParent();
    WorkspacePopupMenu pop = getRootPopupMenu((Component) e.getSource());
    JTree tree = (JTree) pop.getInvoker();
    return tree.getComponentAt(pop.getInvokerLocation());
}
Also used : JTree(javax.swing.JTree) WorkspacePopupMenu(org.freeplane.plugin.workspace.components.menu.WorkspacePopupMenu)

Aggregations

WorkspacePopupMenu (org.freeplane.plugin.workspace.components.menu.WorkspacePopupMenu)12 JTree (javax.swing.JTree)3 TreePath (javax.swing.tree.TreePath)2 AWorkspaceTreeNode (org.freeplane.plugin.workspace.model.AWorkspaceTreeNode)2 Point (java.awt.Point)1