()
| 185 | } |
| 186 | |
| 187 | @AstroImageJ(reason = "Add check for AIJ windows", modified = true) |
| 188 | void addMenuBar() { |
| 189 | mb = new MenuBar(); |
| 190 | if (Menus.getFontSize()!=0) |
| 191 | mb.setFont(Menus.getFont()); |
| 192 | Menu m = new Menu("File"); |
| 193 | m.add(new MenuItem("Save As...", new MenuShortcut(KeyEvent.VK_S))); |
| 194 | if (isResultsTable) { |
| 195 | m.add(new MenuItem("Rename...")); |
| 196 | m.add(new MenuItem("Duplicate...")); |
| 197 | } |
| 198 | m.addActionListener(this); |
| 199 | mb.add(m); |
| 200 | textPanel.fileMenu = m; |
| 201 | m = new Menu("Edit"); |
| 202 | m.add(new MenuItem("Cut", new MenuShortcut(KeyEvent.VK_X))); |
| 203 | m.add(new MenuItem("Copy", new MenuShortcut(KeyEvent.VK_C))); |
| 204 | m.add(new MenuItem("Clear")); |
| 205 | m.add(new MenuItem("Select All", new MenuShortcut(KeyEvent.VK_A))); |
| 206 | m.addSeparator(); |
| 207 | m.add(new MenuItem("Find...", new MenuShortcut(KeyEvent.VK_F))); |
| 208 | m.add(new MenuItem("Find Next", new MenuShortcut(KeyEvent.VK_G))); |
| 209 | m.addActionListener(this); |
| 210 | mb.add(m); |
| 211 | textPanel.editMenu = m; |
| 212 | m = new Menu("Font"); |
| 213 | m.add(new MenuItem("Make Text Smaller")); |
| 214 | m.add(new MenuItem("Make Text Larger")); |
| 215 | m.addSeparator(); |
| 216 | monospacedButton = new CheckboxMenuItem("Monospaced", monospaced); |
| 217 | monospacedButton.addItemListener(this); |
| 218 | m.add(monospacedButton); |
| 219 | antialiasedButton = new CheckboxMenuItem("Antialiased", Prefs.get(FONT_ANTI, true)); |
| 220 | if (IJ.isMacOSX()) antialiasedButton.setState(true); |
| 221 | antialiasedButton.addItemListener(this); |
| 222 | m.add(antialiasedButton); |
| 223 | m.add(new MenuItem("Save Settings")); |
| 224 | m.addActionListener(this); |
| 225 | mb.add(m); |
| 226 | if (isResultsTable) { |
| 227 | m = new Menu("Results"); |
| 228 | m.add(new MenuItem("Clear Results")); |
| 229 | m.add(new MenuItem("Summarize")); |
| 230 | m.add(new MenuItem("Distribution...")); |
| 231 | m.add(new MenuItem("Set Measurements...")); |
| 232 | m.add(new MenuItem("Sort...")); |
| 233 | m.add(new MenuItem("Plot...")); |
| 234 | m.add(new MenuItem("Options...")); |
| 235 | m.addActionListener(this); |
| 236 | mb.add(m); |
| 237 | } |
| 238 | setMenuBar(mb); |
| 239 | } |
| 240 | |
| 241 | /** |
| 242 | Adds one or more lines of text to the window. |
no test coverage detected