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

Method close

ij/src/main/java/ij/plugin/Commands.java:89–102  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

87 }
88
89 void close() {
90 ImagePlus imp = WindowManager.getCurrentImage();
91 Window win = WindowManager.getActiveWindow();
92 if (win==null || (Interpreter.isBatchMode() && win instanceof ImageWindow))
93 closeImage(imp);
94 else if (win instanceof PlugInFrame && !"Commands".equals(((PlugInFrame)win).getTitle()))
95 ((PlugInFrame)win).close();
96 else if (win instanceof PlugInDialog)
97 ((PlugInDialog)win).close();
98 else if (win instanceof TextWindow)
99 ((TextWindow)win).close();
100 else
101 closeImage(imp);
102 }
103
104 /** Closes all image windows, or returns 'false' if the user cancels the unsaved changes dialog box. */
105 public static boolean closeAll() {

Callers 1

runMethod · 0.95

Calls 7

getCurrentImageMethod · 0.95
getActiveWindowMethod · 0.95
isBatchModeMethod · 0.95
closeImageMethod · 0.95
getTitleMethod · 0.65
closeMethod · 0.65
equalsMethod · 0.45

Tested by

no test coverage detected