public void imageClosed(ImagePlus image) { if(image == ip){ image.getProperties().remove(MONITOR_LOC); listeners.clear(); ImagePlus.removeImageListener(this); } }
public void imageClosed(ImagePlus image) { if(image == ip){ image.getProperties().remove(MONITOR_LOC); listeners.clear(); ImagePlus.removeImageListener(this); } }
private void removeImageListeners() { imp.removeImageListener(this); canvas.removeKeyListener(this); }
public void dispose() { ImagePlus.removeImageListener(this); handleImages(false); }
private void removeImageListeners() { imp.removeImageListener(this); canvas.removeKeyListener(this); }
/** * Quit the GUI */ private void quitGui() { ImagePlus.removeImageListener( this ); this.removeWindowListener( this ); this.dispose(); }
private void removeListeners() { if (srcImp==null) return; ImagePlus.removeImageListener(this); Roi.removeRoiListener(this); if (live!=null) { Font font = live.getFont(); live.setFont(new Font(font.getName(), Font.PLAIN, font.getSize())); live.setForeground(Color.black); } }
private void removeListeners() { if (srcImp==null) return; ImagePlus.removeImageListener(this); Roi.removeRoiListener(this); if (live!=null) { Font font = live.getFont(); live.setFont(new Font(font.getName(), Font.PLAIN, font.getSize())); live.setForeground(Color.black); } }
private void disableLivePlot() { if (IJ.debugMode) IJ.log("PlotWindow.disableLivePlot: "+srcImp); if (srcImp==null) return; if (bgThread!=null) bgThread.interrupt(); bgThread = null; ImagePlus.removeImageListener(this); Roi.removeRoiListener(this); if (live != null) { Font font = live.getFont(); live.setFont(new Font(font.getName(), Font.PLAIN, font.getSize())); live.setForeground(Color.black); } }
private void disableLivePlot() { if (IJ.debugMode) IJ.log("PlotWindow.disableLivePlot: "+srcImp); if (srcImp==null) return; if (bgThread!=null) bgThread.interrupt(); bgThread = null; ImagePlus.removeImageListener(this); Roi.removeRoiListener(this); if (live != null) { Font font = live.getFont(); live.setFont(new Font(font.getName(), Font.PLAIN, font.getSize())); live.setForeground(Color.black); } }
private void removeListeners() { //IJ.log("removeListeners"); if(srcImp == null) { return; } ImageCanvas canvas = srcImp.getCanvas(); canvas.removeMouseListener(this); canvas.removeMouseMotionListener(this); canvas.removeKeyListener(this); ImagePlus.removeImageListener(this); Font font = live.getFont(); live.setFont(new Font(font.getName(), Font.PLAIN, font.getSize())); live.setForeground(Color.black); }
/** Override parent windowClosing method to clean up synchronized resources on exit. */ public void windowClosing(WindowEvent e) { if(e.getSource() == this) { removeAllWindows(); ImagePlus.removeImageListener(this); Executer.removeCommandListener(this); close(); } }
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); }
/** Override parent windowClosing method to clean up synchronized resources on exit. */ public void windowClosing(WindowEvent e) { if(e.getSource() == this) { removeAllWindows(); ImagePlus.removeImageListener(this); Executer.removeCommandListener(this); close(); } }
public void eventOccurred(int eventID) { switch (eventID) { case IJEventListener.FOREGROUND_COLOR_CHANGED: String c = Integer.toHexString(Toolbar.getForegroundColor().getRGB()); c = "#"+c.substring(2); IJ.log("Changed foreground color to "+c); break; case IJEventListener.BACKGROUND_COLOR_CHANGED: c = Integer.toHexString(Toolbar.getBackgroundColor().getRGB()); c = "#"+c.substring(2); IJ.log("Changed background color to "+c); break; case IJEventListener.TOOL_CHANGED: String name = IJ.getToolName(); IJ.log("Switched to the "+name+(name.endsWith("Tool")?"":" tool")); break; case IJEventListener.COLOR_PICKER_CLOSED: IJ.log("Color picker closed"); break; case IJEventListener.LOG_WINDOW_CLOSED: IJ.removeEventListener(this); Executer.removeCommandListener(this); ImagePlus.removeImageListener(this); Roi.removeRoiListener(this); IJ.showStatus("Log window closed; EventListener stopped"); break; } }
commandOptions = null; if (imageID!=0) { ImagePlus.removeImageListener(instance); imageID = 0;
public void eventOccurred(int eventID) { switch (eventID) { case IJEventListener.FOREGROUND_COLOR_CHANGED: String c = Integer.toHexString(Toolbar.getForegroundColor().getRGB()); c = "#"+c.substring(2); IJ.log("Changed foreground color to "+c); break; case IJEventListener.BACKGROUND_COLOR_CHANGED: c = Integer.toHexString(Toolbar.getBackgroundColor().getRGB()); c = "#"+c.substring(2); IJ.log("Changed background color to "+c); break; case IJEventListener.TOOL_CHANGED: String name = IJ.getToolName(); IJ.log("Switched to the "+name+(name.endsWith("Tool")?"":" tool")); break; case IJEventListener.COLOR_PICKER_CLOSED: IJ.log("Color picker closed"); break; case IJEventListener.LOG_WINDOW_CLOSED: IJ.removeEventListener(this); Executer.removeCommandListener(this); ImagePlus.removeImageListener(this); Roi.removeRoiListener(this); IJ.showStatus("Log window closed; EventListener stopped"); break; } }
protected void unregisterTool() { if (toolToggleListener != null && toolActive) { toolToggleListener.toolToggled(false); toolActive = false; } for (int id : WindowManager.getIDList()) unregisterTool(WindowManager.getImage(id)); ImagePlus.removeImageListener(this); for (SliceObserver observer : sliceObservers) observer.unregister(); sliceObservers.clear(); if (toolbarMouseListener != null) toolbar.removeMouseListener(toolbarMouseListener); IJ.getInstance().removeWindowFocusListener(this); }
ImagePlus.removeImageListener(this); Executer.removeCommandListener(this); win.removeWindowListener(this);
ImagePlus.removeImageListener(this); Executer.removeCommandListener(this); win.removeWindowListener(this);