/** * Shut down the Dynamic reslice, that is, remove itself from the listener * list. */ public void shutdown() { updater.quit(); updater = null; imp.getCanvas().removeMouseMotionListener(this); imp.getWindow().removeWindowListener(this); dest_imp.getWindow().removeWindowListener(this); IJ.showStatus("Dynamic Reslice shut down."); }
public void unregister() { ImagePlus.removeImageListener(this); if (window == null) return; window.removeWindowListener(this); window.removeMouseWheelListener(this); for (Component child : window.getComponents()) if (child instanceof Scrollbar) ((Scrollbar)child).removeAdjustmentListener(this); else if (child instanceof Container) for (Component child2 : ((Container)child).getComponents()) if (child2 instanceof Scrollbar) ((Scrollbar)child2).removeAdjustmentListener(this); }
protected void handleImage(ImagePlus image, boolean addAsListener) { ImageWindow window = image.getWindow(); for (Component comp : window.getComponents()) if (comp instanceof Scrollbar) { Scrollbar bar = (Scrollbar)comp; if (addAsListener) bar.addAdjustmentListener(this); else bar.removeAdjustmentListener(this); } if (addAsListener) window.addWindowListener(this); else window.removeWindowListener(this); }
ImagePlus.removeImageListener(this); Executer.removeCommandListener(this); win.removeWindowListener(this); win.removeMouseWheelListener(this); win.removeFocusListener(this);
ImagePlus.removeImageListener(this); Executer.removeCommandListener(this); win.removeWindowListener(this); win.removeMouseWheelListener(this); win.removeFocusListener(this);
window.removeWindowListener(this); window.removeKeyListener(handler); window.removeMouseWheelListener(handler);