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

Method itemStateChanged

ij/src/main/java/ij/ImageJ.java:480–490  ·  view source on GitHub ↗

Handles CheckboxMenuItem state changes.

(ItemEvent e)

Source from the content-addressed store, hash-verified

478
479 /** Handles CheckboxMenuItem state changes. */
480 public void itemStateChanged(ItemEvent e) {
481 MenuItem item = (MenuItem)e.getSource();
482 MenuComponent parent = (MenuComponent)item.getParent();
483 String cmd = e.getItem().toString();
484 if ("Autorun Examples".equals(cmd)) // Examples>Autorun Examples
485 Prefs.autoRunExamples = e.getStateChange()==1;
486 else if ((Menu)parent==Menus.window)
487 WindowManager.activateWindow(cmd, item);
488 else
489 doCommand(cmd);
490 }
491
492 public void mousePressed(MouseEvent e) {
493 Undo.reset();

Callers

nothing calls this directly

Calls 5

activateWindowMethod · 0.95
doCommandMethod · 0.95
getParentMethod · 0.80
toStringMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected