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

Method addWindowMenuItem

ij/src/main/java/ij/Menus.java:1457–1467  ·  view source on GitHub ↗

Adds one image to the end of the Window menu.

(ImagePlus imp)

Source from the content-addressed store, hash-verified

1455
1456 /** Adds one image to the end of the Window menu. */
1457 static synchronized void addWindowMenuItem(ImagePlus imp) {
1458 if (ij==null)
1459 return;
1460 String name = imp.getTitle();
1461 String size = ImageWindow.getImageSize(imp);
1462 CheckboxMenuItem item = new CheckboxMenuItem(name+" "+size);
1463 item.setActionCommand("" + imp.getID());
1464 window.add(item);
1465 fixFontSize(item);
1466 item.addItemListener(ij);
1467 }
1468
1469 /** Removes the specified item from the Window menu. */
1470 static synchronized void removeWindowMenuItem(int index) {

Callers 1

addImageWindowMethod · 0.95

Calls 5

getImageSizeMethod · 0.95
fixFontSizeMethod · 0.95
getIDMethod · 0.80
getTitleMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected