Package org.freeplane.plugin.workspace.components.menu

Examples of org.freeplane.plugin.workspace.components.menu.WorkspacePopupMenu


    super(type);
  }

  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.node.new.link",
          WorkspacePopupMenuBuilder.endSubMenu(),
View Full Code Here


 
  public void initializePopup() {
    if (popupMenu == null) {
         
      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(),
View Full Code Here

  public void initializePopup() {
    if (popupMenu == null) {     
     
      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(),
View Full Code Here

    return transferable;
  }

  public void initializePopup() {
    if (popupMenu == null) {     
      popupMenu = new WorkspacePopupMenu();
      WorkspacePopupMenuBuilder.addActions(popupMenu, new String[] {
          "workspace.action.node.cut",
          "workspace.action.node.copy",
          "workspace.action.node.paste",
          WorkspacePopupMenuBuilder.SEPARATOR,
View Full Code Here

    if(e.getSource() instanceof JTree) {
      tree = (JTree) e.getSource();
      path = tree.getSelectionPath();
    }
    else {
      WorkspacePopupMenu pop = getRootPopupMenu((Component) e.getSource());
      if(pop == null) {
        return null;
      }
      tree = (JTree)pop.getInvoker();
      int x = pop.getInvokerLocation().x;
      int y = pop.getInvokerLocation().y;
     
      path = tree.getClosestPathForLocation(x, y);
    }
   
    if(path == null) {
View Full Code Here

    JTree tree = null;
    if(e.getSource() instanceof JTree) {
      tree = (JTree) e.getSource();
    }
    else {
      WorkspacePopupMenu pop = getRootPopupMenu((Component) e.getSource());
      if(pop == null) {
        return null;
      }
      tree = (JTree)pop.getInvoker();
    }
    AWorkspaceTreeNode[] nodes = new AWorkspaceTreeNode[tree.getSelectionPaths().length];
    int i = 0;
    for(TreePath path : tree.getSelectionPaths()) {
      nodes[i++] = (AWorkspaceTreeNode) path.getLastPathComponent();
View Full Code Here

    }
    return (WorkspacePopupMenu) parent;
  }
 
  protected Component getComponentFromActionEvent(ActionEvent e) {
    WorkspacePopupMenu pop = getRootPopupMenu((Component) e.getSource()); //(WorkspacePopupMenu)((Component) e.getSource()).getParent();   
    JTree tree = (JTree)pop.getInvoker();
    return tree.getComponentAt(pop.getInvokerLocation());
  }
View Full Code Here

  public String toString() {
    return this.getClass().getSimpleName()+"[type="+this.getType()+";name="+this.getName()+"]";
  }
   
  public void showPopup(Component component, int x, int y) {   
    final WorkspacePopupMenu popupMenu = getContextMenu();
    if(popupMenu == null) {
      return;
    }
    popupMenu.setInvokerLocation(new Point(x, y));
    if (popupMenu != null) {
      popupMenu.show(component, x, y);
    }
  }
View Full Code Here

    return clone(node);
  }

  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(),
View Full Code Here

  }

  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(),
View Full Code Here

TOP

Related Classes of org.freeplane.plugin.workspace.components.menu.WorkspacePopupMenu

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.