MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / removeWindowMenuItem

Method removeWindowMenuItem

ij/src/main/java/ij/Menus.java:1470–1486  ·  view source on GitHub ↗

Removes the specified item from the Window menu.

(int index)

Source from the content-addressed store, hash-verified

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) {

Callers 2

removeWindowMethod · 0.95
removeImageWindowMethod · 0.95

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected