(ImageJ ij)
| 1263 | } |
| 1264 | |
| 1265 | void installPopupMenu(ImageJ ij) { |
| 1266 | String s; |
| 1267 | int count = 0; |
| 1268 | MenuItem mi; |
| 1269 | popup = new PopupMenu(""); |
| 1270 | if (fontSize!=0 || scale>1.0) |
| 1271 | popup.setFont(getCachedFont()); |
| 1272 | while (true) { |
| 1273 | count++; |
| 1274 | s = Prefs.getString("popup" + (count/10)%10 + count%10); |
| 1275 | if (s==null) |
| 1276 | break; |
| 1277 | if (s.equals("-")) |
| 1278 | popup.addSeparator(); |
| 1279 | else if (!s.equals("")) { |
| 1280 | mi = new MenuItem(s); |
| 1281 | mi.addActionListener(ij); |
| 1282 | popup.add(mi); |
| 1283 | } |
| 1284 | } |
| 1285 | } |
| 1286 | |
| 1287 | public static MenuBar getMenuBar() { |
| 1288 | return mbar; |
no test coverage detected