Removes the specified item from the Window menu.
(int index)
| 1468 | |
| 1469 | /** Removes the specified item from the Window menu. */ |
| 1470 | static synchronized void removeWindowMenuItem(int index) { |
| 1471 | //IJ.log("removeWindowMenuItem: "+index+" "+windowMenuItems2+" "+window.getItemCount()); |
| 1472 | if (ij==null) |
| 1473 | return; |
| 1474 | try { |
| 1475 | if (index>=0 && index<window.getItemCount()) { |
| 1476 | window.remove(WINDOW_MENU_ITEMS+index); |
| 1477 | if (index<windowMenuItems2) { |
| 1478 | windowMenuItems2--; |
| 1479 | if (windowMenuItems2==1) { |
| 1480 | window.remove(WINDOW_MENU_ITEMS); |
| 1481 | windowMenuItems2 = 0; |
| 1482 | } |
| 1483 | } |
| 1484 | } |
| 1485 | } catch (Exception e) {} |
| 1486 | } |
| 1487 | |
| 1488 | /** Changes the name of an item in the Window menu. */ |
| 1489 | public static synchronized void updateWindowMenuItem(String oldLabel, String newLabel) { |
no test coverage detected