()
| 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() { |
no test coverage detected