Package ca.nengo.ui.lib.util.menus

Examples of ca.nengo.ui.lib.util.menus.PopupMenuBuilder.addAction()


    if ((myTermination != null) && (myTermination instanceof Interactable)) {
      return ((Interactable) myTermination).getContextMenu();
    }

    PopupMenuBuilder menu = new PopupMenuBuilder("Line End");
    menu.addAction(new StandardAction("Remove") {

      private static final long serialVersionUID = 1L;

      @Override
      protected void action() throws ActionException {
View Full Code Here


                    menuBuilder = new PopupMenuBuilder(leafNode.toString());

                    if(leafNode instanceof DefaultMutableTreeNode &&
                            ((DefaultMutableTreeNode)leafNode).getUserObject() instanceof String) {
                        menuBuilder.addAction(new RenameAction((DefaultMutableTreeNode)leafNode));
                    }

                    menuBuilder.addAction(new ExportDelimitedFileAction(DataListView.this, leafNode));
                    menuBuilder.addAction(new ExportMatlabAction(DataListView.this, leafNode));
View Full Code Here

                    if(leafNode instanceof DefaultMutableTreeNode &&
                            ((DefaultMutableTreeNode)leafNode).getUserObject() instanceof String) {
                        menuBuilder.addAction(new RenameAction((DefaultMutableTreeNode)leafNode));
                    }

                    menuBuilder.addAction(new ExportDelimitedFileAction(DataListView.this, leafNode));
                    menuBuilder.addAction(new ExportMatlabAction(DataListView.this, leafNode));


                    if (leafNode instanceof NengoTreeNode) {
                        NengoTreeNode neoTreeNode = (NengoTreeNode) leafNode;
View Full Code Here

                            ((DefaultMutableTreeNode)leafNode).getUserObject() instanceof String) {
                        menuBuilder.addAction(new RenameAction((DefaultMutableTreeNode)leafNode));
                    }

                    menuBuilder.addAction(new ExportDelimitedFileAction(DataListView.this, leafNode));
                    menuBuilder.addAction(new ExportMatlabAction(DataListView.this, leafNode));


                    if (leafNode instanceof NengoTreeNode) {
                        NengoTreeNode neoTreeNode = (NengoTreeNode) leafNode;
View Full Code Here

                    if (leafNode instanceof NengoTreeNode) {
                        NengoTreeNode neoTreeNode = (NengoTreeNode) leafNode;

                        if (neoTreeNode.getNeoNode() != null) {
                            menuBuilder.addAction(new ConfigureAction("Inspector",
                                    neoTreeNode.getNeoNode()));
                        }
                    }

                    if (leafNode instanceof DataTreeNode) {
View Full Code Here

                        ((DataTreeNode) leafNode).constructPopupMenu(menuBuilder, dataModel);
                    }

                } else {
                    menuBuilder = new PopupMenuBuilder(dataNodes.size() + " data nodes selected");
                    menuBuilder.addAction(new PlotNodesAction(dataNodes));
                }
            } else if (leafNodes.size() == 1) {
                menuBuilder = new PopupMenuBuilder(leafNodes.get(0).toString());
            } else {
                menuBuilder = new PopupMenuBuilder(leafNodes.size() + " nodes selected");
View Full Code Here

                } else {
                    removeNodes.add(node);
                }
            }

            menuBuilder.addAction(new RemoveTreeNodes(removeNodes));
            menu = menuBuilder.toJPopupMenu();

            if (menu != null) {
                menu.show(e.getComponent(), e.getPoint().x, e.getPoint().y);
                menu.setVisible(true);
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.