/** * Make the edit menu * * @param editMenu edit menu * @return edit menu */ public JMenu makeEditMenu(JMenu editMenu) { editMenu.add(GuiUtils.makeDynamicMenu("Symbols", this, "initSymbolsMenu")); editMenu.add( GuiUtils.makeMenuItem("Set properties on selected", this, "setPropertiesOnSelected")); editMenu.addSeparator(); return super.makeEditMenu(editMenu); }
/** * Make the view menu * * @param viewMenu view menu * @return The view menu */ public JMenu makeViewMenu(JMenu viewMenu) { showAlignmentPointsMI = new JCheckBoxMenuItem("Show Alignment Points", true); viewMenu.add(showAlignmentPointsMI); showAlignmentPointsMI.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent ae) { repaint(); } }); viewMenu.addSeparator(); super.makeViewMenu(viewMenu); viewMenu.addSeparator(); viewMenu.add(makeMenuItem("Black background", CMD_BLACKBG)); viewMenu.add(makeMenuItem("White background", CMD_WHITEBG)); return viewMenu; }
/** Make the file menu */ private void makeFileMenu() { fileMenu.removeAll(); fileMenu.add(makeMenuItem("New", 'n', GuiUtils.CMD_NEW)); fileMenu.addSeparator(); fileMenu.add(makeMenuItem("Save", 's', GuiUtils.CMD_SAVE)); fileMenu.add(makeMenuItem("Save As...", GuiUtils.CMD_SAVEAS)); fileMenu.add(makeMenuItem("Rename...", GuiUtils.CMD_RENAME)); fileMenu.addSeparator(); JMenuItem removeMenuItem = makeMenuItem("Remove", GuiUtils.CMD_REMOVE); removeMenuItem.setEnabled(smm.isUsers(stationModel)); fileMenu.add(removeMenuItem); fileMenu.addSeparator(); fileMenu.add(makeMenuItem("Import...", GuiUtils.CMD_IMPORT)); fileMenu.add(makeMenuItem("Export...", GuiUtils.CMD_EXPORT)); fileMenu.addSeparator(); fileMenu.add(makeMenuItem("Close", GuiUtils.CMD_CLOSE)); }