()
| 120 | } |
| 121 | |
| 122 | @AstroImageJ(reason = """ |
| 123 | Disable IJ zoom in favor of AIJ zoom |
| 124 | Rename IJ to AIJ |
| 125 | Remove IJ news |
| 126 | Always set menubar font to that the default font is replaced |
| 127 | """, modified = true) |
| 128 | String addMenuBar() { |
| 129 | scale = Prefs.getGuiScale(); |
| 130 | //if ((scale>=1.5&&scale<2.0) || (scale>=2.5&&scale<3.0)) |
| 131 | // scale = (int)Math.round(scale); |
| 132 | nPlugins = nMacros = userPluginsIndex = 0; |
| 133 | addSorted = installingJars = duplicateCommand = false; |
| 134 | error = null; |
| 135 | mbar = null; |
| 136 | menus = new Properties(); |
| 137 | pluginsTable = new Hashtable(); |
| 138 | shortcuts = new Hashtable(); |
| 139 | pluginsPrefs = new Vector(); |
| 140 | macroShortcuts = null; |
| 141 | setupPluginsAndMacrosPaths(); |
| 142 | Menu file = getMenu("File"); |
| 143 | Menu newMenu = getMenu("File>New", true); |
| 144 | addPlugInItem(file, "Open...", "ij.plugin.Commands(\"open\")", KeyEvent.VK_O, false); |
| 145 | addPlugInItem(file, "Open Next", "ij.plugin.NextImageOpener", KeyEvent.VK_O, true); |
| 146 | Menu openSamples = getMenu("File>Open Samples", true); |
| 147 | openSamples.addSeparator(); |
| 148 | addPlugInItem(openSamples, "Cache Sample Images ", "ij.plugin.URLOpener(\"cache\")", 0, false); |
| 149 | addOpenRecentSubMenu(file); |
| 150 | Menu importMenu = getMenu("File>Import", true); |
| 151 | Menu showFolderMenu = new Menu("Show Folder"); |
| 152 | fixFontSize(showFolderMenu); |
| 153 | file.add(showFolderMenu); |
| 154 | addPlugInItem(showFolderMenu, "Image", "ij.plugin.SimpleCommands(\"showdirImage\")", 0, false); |
| 155 | addPlugInItem(showFolderMenu, "Plugins", "ij.plugin.SimpleCommands(\"showdirPlugins\")", 0, false); |
| 156 | addPlugInItem(showFolderMenu, "Macros", "ij.plugin.SimpleCommands(\"showdirMacros\")", 0, false); |
| 157 | addPlugInItem(showFolderMenu, "LUTs", "ij.plugin.SimpleCommands(\"showdirLuts\")", 0, false); |
| 158 | addPlugInItem(showFolderMenu, "ImageJ", "ij.plugin.SimpleCommands(\"showdirImageJ\")", 0, false); |
| 159 | addPlugInItem(showFolderMenu, "temp", "ij.plugin.SimpleCommands(\"showdirTemp\")", 0, false); |
| 160 | addPlugInItem(showFolderMenu, "Home", "ij.plugin.SimpleCommands(\"showdirHome\")", 0, false); |
| 161 | file.addSeparator(); |
| 162 | addPlugInItem(file, "Close", "ij.plugin.Commands(\"close\")", KeyEvent.VK_W, false); |
| 163 | addPlugInItem(file, "Close All", "ij.plugin.Commands(\"close-all\")", KeyEvent.VK_W, true); |
| 164 | addPlugInItem(file, "Save", "ij.plugin.Commands(\"save\")", KeyEvent.VK_S, false); |
| 165 | saveAsMenu = getMenu("File>Save As", true); |
| 166 | addPlugInItem(file, "Revert", "ij.plugin.Commands(\"revert\")", KeyEvent.VK_R, true); |
| 167 | file.addSeparator(); |
| 168 | addPlugInItem(file, "Page Setup...", "ij.plugin.filter.Printer(\"setup\")", 0, false); |
| 169 | addPlugInItem(file, "Print...", "ij.plugin.filter.Printer(\"print\")", KeyEvent.VK_P, false); |
| 170 | |
| 171 | Menu edit = getMenu("Edit"); |
| 172 | addPlugInItem(edit, "Undo", "ij.plugin.Commands(\"undo\")", KeyEvent.VK_Z, false); |
| 173 | edit.addSeparator(); |
| 174 | addPlugInItem(edit, "Cut", "ij.plugin.Clipboard(\"cut\")", KeyEvent.VK_X, false); |
| 175 | addPlugInItem(edit, "Copy", "ij.plugin.Clipboard(\"copy\")", KeyEvent.VK_C, false); |
| 176 | addPlugInItem(edit, "Copy to System", "ij.plugin.Clipboard(\"scopy\")", 0, false); |
| 177 | addPlugInItem(edit, "Paste", "ij.plugin.Clipboard(\"paste\")", KeyEvent.VK_V, false); |
| 178 | addPlugInItem(edit, "Paste Control...", "ij.plugin.frame.PasteController", 0, false); |
| 179 | edit.addSeparator(); |
no test coverage detected