public void windowClosed(WindowEvent e) { canvas.removeMouseMotionListener(this); original.setOverlay(null); }
protected void unregisterTool(ImageCanvas canvas) { if (canvas == null) return; if (mouseProxy != null) canvas.removeMouseListener(mouseProxy); if (mouseMotionProxy != null) // we leave the ijMouseMotionProxy in because it might be required by another active custom tool canvas.removeMouseMotionListener(mouseMotionProxy); if (mouseWheelProxy != null) canvas.removeMouseWheelListener(mouseWheelProxy); if (keyProxy != null) // we leave the ijKeyProxy in because it might be required by another active custom tool canvas.removeKeyListener(keyProxy); }
protected void addMouseMotionListener(ImageCanvas canvas) { if (mouseMotionProxy != null) { canvas.addMouseMotionListener(mouseMotionProxy); // make sure that IJ gets only unconsumed key events MouseMotionListener listener = null; for (MouseMotionListener listener2 : canvas.getMouseMotionListeners()) if (listener2 == canvas || listener2.getClass().getName().endsWith("MouseMotionProxyIfNotConsumed")) listener = listener2; if (listener == null) listener = new MouseMotionProxyIfNotConsumed(canvas); else { canvas.removeMouseMotionListener(listener); if (listener == canvas) listener = new MouseMotionProxyIfNotConsumed(canvas); } canvas.addMouseMotionListener(listener); } }
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); }
imp.getCanvas().removeMouseMotionListener( this ); imp.getCanvas().removeKeyListener( this ); imp.getCanvas().setDisplayList( null );
/** Remove "this" object as mouse listener and mouse motion * listener from the window with ID I. */ private void removeWindow(Integer I) { ImagePlus imp; ImageWindow iw; ImageCanvas ic; imp = WindowManager.getImage(I.intValue()); if (imp != null) { iw = imp.getWindow(); if (iw != null) { ic = iw.getCanvas(); if (ic != null) { ic.removeMouseListener(this); ic.removeMouseMotionListener(this); // Repaint to get rid of sync indicator. ic.paint(ic.getGraphics()); } } } }
imp.getCanvas().removeMouseMotionListener( this ); imp.getCanvas().removeKeyListener( this ); imp.getCanvas().setDisplayList( null );
/** Remove "this" object as mouse listener and mouse motion * listener from the window with ID I. */ private void removeWindow(Integer I) { ImagePlus imp; ImageWindow iw; ImageCanvas ic; imp = WindowManager.getImage(I.intValue()); if (imp != null) { iw = imp.getWindow(); if (iw != null) { ic = iw.getCanvas(); if (ic != null) { ic.removeMouseListener(this); ic.removeMouseMotionListener(this); // Repaint to get rid of sync indicator. ic.paint(ic.getGraphics()); } } } }
/** * 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."); }
imp.getCanvas().removeMouseMotionListener( this ); imp.getCanvas().removeKeyListener( this ); imp.getWindow().removeKeyListener( this );
imp.getCanvas().removeMouseMotionListener( this ); imp.getCanvas().removeKeyListener( this ); imp.getWindow().removeKeyListener( this );
/** * Kill listeners. */ public void killListeners () { if(imp != null) { final ImageWindow iw = imp.getWindow(); if(null != iw) { final ImageCanvas ic = iw.getCanvas(); ic.removeKeyListener(pa); ic.removeMouseListener(pa); ic.removeMouseMotionListener(pa); ic.addMouseMotionListener(ic); ic.addMouseListener(ic); ic.addKeyListener(IJ.getInstance()); } } } /* end killListeners */
imp.getCanvas().removeMouseMotionListener( this ); imp.getCanvas().removeKeyListener( this ); imp.getCanvas().setDisplayList( null );
public ImageCanvas3D(final int width, final int height, final UIAdapter uia) { super(SimpleUniverse.getPreferredConfiguration()); this.ui = uia; setPreferredSize(new Dimension(width, height)); final ByteProcessor ip = new ByteProcessor(width, height); roiImagePlus = new RoiImagePlus("RoiImage", ip); roiImageCanvas = new ImageCanvas(roiImagePlus) { /* prevent ROI to enlarge/move on mouse click */ @Override public void mousePressed(final MouseEvent e) { if (!ui.isMagnifierTool() && !ui.isPointTool()) super.mousePressed(e); } }; roiImageCanvas.removeKeyListener(ij.IJ.getInstance()); roiImageCanvas.removeMouseListener(roiImageCanvas); roiImageCanvas.removeMouseMotionListener(roiImageCanvas); roiImageCanvas.disablePopupMenu(true); background = new Background(new Color3f(UniverseSettings.defaultBackground)); background.setCapability(Background.ALLOW_COLOR_WRITE); addListeners(); }
canvas.removeMouseMotionListener(this); canvas.removeKeyListener(this); canvas.setCustomRoi(false); ic.removeKeyListener(this); ic.removeMouseListener(this); ic.removeMouseMotionListener(this); ic.setCustomRoi(false); ic.removeKeyListener(this); ic.removeMouseListener(this); ic.removeMouseMotionListener(this); ic.setCustomRoi(false);
imp.getCanvas().removeMouseMotionListener( this ); imp.getCanvas().removeKeyListener( this ); imp.getCanvas().setDisplayList( null );
canvas.removeMouseMotionListener(this); canvas.removeKeyListener(this); canvas.setCustomRoi(false); ic.removeKeyListener(this); ic.removeMouseListener(this); ic.removeMouseMotionListener(this); ic.setCustomRoi(false); ic.removeKeyListener(this); ic.removeMouseListener(this); ic.removeMouseMotionListener(this); ic.setCustomRoi(false);
ic.removeMouseMotionListener(ic); ic.removeMouseListener(ic); ic.removeKeyListener(IJ.getInstance());
window.removeMouseWheelListener(window); canvas.removeKeyListener(IJ.getInstance()); canvas.removeMouseMotionListener(canvas); canvas.removeMouseListener(canvas); logok();
window.removeMouseWheelListener(handler); canvas.removeKeyListener(handler); canvas.removeMouseMotionListener(handler); canvas.removeMouseListener(handler);