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

Method close

ij/src/main/java/ij/plugin/frame/Editor.java:1365–1386  ·  view source on GitHub ↗

Overrides close() in PlugInFrame.

()

Source from the content-addressed store, hash-verified

1363
1364 /** Overrides close() in PlugInFrame. */
1365 public void close() {
1366 boolean okayToClose = true;
1367 ImageJ ij = IJ.getInstance();
1368 if (!getTitle().equals("Errors") && changes && !IJ.isMacro() && ij!=null && !ij.quittingViaMacro()) {
1369 String msg = "Save changes to \"" + getTitle() + "\"?";
1370 YesNoCancelDialog d = new YesNoCancelDialog(this, "Editor", msg);
1371 if (d.cancelPressed())
1372 okayToClose = false;
1373 else if (d.yesPressed())
1374 save();
1375 }
1376 if (okayToClose) {
1377 //setVisible(false);
1378 dispose();
1379 WindowManager.removeWindow(this);
1380 nWindows--;
1381 instance = null;
1382 changes = false;
1383 if (functionFinder!=null)
1384 functionFinder.close();
1385 }
1386 }
1387
1388 public void saveAs() {
1389 String name1 = getTitle();

Callers

nothing calls this directly

Calls 11

getInstanceMethod · 0.95
isMacroMethod · 0.95
quittingViaMacroMethod · 0.95
cancelPressedMethod · 0.95
yesPressedMethod · 0.95
saveMethod · 0.95
removeWindowMethod · 0.95
getTitleMethod · 0.65
closeMethod · 0.65
equalsMethod · 0.45
disposeMethod · 0.45

Tested by

no test coverage detected