/** Releases the resources used by this PlotWindow */ public void dispose() { if (plot!=null) plot.dispose(); disableLivePlot(); plot = null; plotMaker = null; srcImp = null; super.dispose(); }
/** Releases the resources used by this PlotWindow */ public void dispose() { if (plot!=null) plot.dispose(); disableLivePlot(); plot = null; plotMaker = null; srcImp = null; super.dispose(); }
ij.addWindowListener(new WindowAdapter() { @Override public void windowClosing(final WindowEvent e) { // dispose all image windows for (final int id : WindowManager.getIDList()) { final ImagePlus imp = WindowManager.getImage(id); if (imp == null) continue; final ImageWindow win = imp.getWindow(); if (win != null) win.dispose(); } // dispose all other ImageJ windows for (final Window w : WindowManager.getAllNonImageWindows()) { w.dispose(); } } });
public void windowClosing(WindowEvent e) { if (closed) return; if (ij!=null) { WindowManager.setCurrentWindow(this); IJ.doCommand("Close"); } else { dispose(); WindowManager.removeWindow(this); } }
public void windowClosing(WindowEvent e) { if (closed) return; if (ij!=null) { WindowManager.setCurrentWindow(this); IJ.doCommand("Close"); } else { dispose(); WindowManager.removeWindow(this); } }
if (ij!=null && ij.quitting()) // this may help avoid thread deadlocks return true; dispose(); if (imp!=null) imp.flush();
if (ij!=null && ij.quitting()) // this may help avoid thread deadlocks return true; dispose(); if (imp!=null) imp.flush();