public PlugInDialog(String title) { super(IJ.isMacOSX()?IJ.getInstance():null,title); enableEvents(AWTEvent.WINDOW_EVENT_MASK); this.title = title; ImageJ ij = IJ.getInstance(); if (IJ.isMacOSX() && ij!=null) { ij.toFront(); // needed for keyboard shortcuts to work IJ.wait(250); } addWindowListener(this); addFocusListener(this); if (IJ.isLinux()) setBackground(ImageJ.backgroundColor); if (ij!=null && !IJ.isMacOSX()) { Image img = ij.getIconImage(); if (img!=null) try {setIconImage(img);} catch (Exception e) {} } }
public void close() { super.close(); instance = null; location = getLocation(); }
/** Closes this window. */ public void close() { //setVisible(false); dispose(); WindowManager.removeWindow(this); }
public void windowActivated(WindowEvent e) { super.windowActivated(e); plot.requestFocus(); ImagePlus imp = WindowManager.getCurrentImage(); if (!firstActivation && imp!=null) setup(imp, false); }
public void windowActivated(WindowEvent e) { super.windowActivated(e); plot.requestFocus(); ImagePlus imp = WindowManager.getCurrentImage(); if (!firstActivation && imp!=null) setup(imp, false); }
public PlugInDialog(String title) { super(IJ.isMacOSX()?IJ.getInstance():null,title); enableEvents(AWTEvent.WINDOW_EVENT_MASK); this.title = title; ImageJ ij = IJ.getInstance(); if (IJ.isMacOSX() && ij!=null) { ij.toFront(); // needed for keyboard shortcuts to work IJ.wait(250); } addWindowListener(this); addFocusListener(this); if (IJ.isLinux()) setBackground(ImageJ.backgroundColor); if (ij!=null && !IJ.isMacOSX()) { Image img = ij.getIconImage(); if (img!=null) try {setIconImage(img);} catch (Exception e) {} } }
public void close() { super.close(); instance = null; location = getLocation(); }
public void windowActivated(WindowEvent e) { super.windowActivated(e); if (IJ.isMacro()) { // do nothing if macro and RGB image ImagePlus imp2 = WindowManager.getCurrentImage(); if (imp2!=null && imp2.getBitDepth()==24) { return; } } previousImageID = 0; // user may have modified image setup(); WindowManager.setWindow(this); }
/** Closes this window. */ public void close() { //setVisible(false); dispose(); WindowManager.removeWindow(this); }
/** Overrides close() in PlugInDialog. */ public void close() { super.close(); instance = null; done = true; Prefs.saveLocation(LOC_KEY, getLocation()); synchronized(this) { notify(); } }
public void windowActivated(WindowEvent e) { super.windowActivated(e); if (IJ.isMacro()) { // do nothing if macro and RGB image ImagePlus imp2 = WindowManager.getCurrentImage(); if (imp2!=null && imp2.getBitDepth()==24) { return; } } previousImageID = 0; // user may have modified image setup(); WindowManager.setWindow(this); }
/** Overrides close() in PlugInDialog. */ public void close() { super.close(); instance = null; done = true; Prefs.saveLocation(LOC_KEY, getLocation()); synchronized(this) { notify(); } }
public void windowClosing(WindowEvent e) { if (e.getSource()==this) { close(); if (Recorder.record) Recorder.record("run", "Close"); } }
public void windowClosing(WindowEvent e) { if (e.getSource()==this) { close(); if (Recorder.record) Recorder.record("run", "Close"); } }
public void close() { super.close(); instance = null; Prefs.saveLocation(LOC_KEY, getLocation()); IJ.notifyEventListeners(IJEventListener.COLOR_PICKER_CLOSED); }
public void close() { super.close(); instance = null; Prefs.saveLocation(LOC_KEY, getLocation()); IJ.notifyEventListeners(IJEventListener.COLOR_PICKER_CLOSED); }
/** Overrides close() in PlugInFrame. */ public void close() { super.close(); instance = null; done = true; Prefs.saveLocation(LOC_KEY, getLocation()); Prefs.set(MODE_KEY, mode); Prefs.set(DARK_BACKGROUND, darkBackground.getState()); Prefs.set(NO_RESET, noResetButton.getState()); synchronized(this) { notify(); } }
/** Overrides close() in PlugInFrame. */ public void close() { super.close(); instance = null; done = true; Prefs.saveLocation(LOC_KEY, getLocation()); Prefs.set(MODE_KEY, mode); Prefs.set(DARK_BACKGROUND, darkBackground.getState()); Prefs.set(NO_RESET, noResetButton.getState()); synchronized(this) { notify(); } }
void close() { ImagePlus imp = WindowManager.getCurrentImage(); Window win = WindowManager.getActiveWindow(); if (win==null || (Interpreter.isBatchMode() && win instanceof ImageWindow)) closeImage(imp); else if (win instanceof PlugInFrame) ((PlugInFrame)win).close(); else if (win instanceof PlugInDialog) ((PlugInDialog)win).close(); else if (win instanceof TextWindow) ((TextWindow)win).close(); else closeImage(imp); }
void close() { ImagePlus imp = WindowManager.getCurrentImage(); Window win = WindowManager.getActiveWindow(); if (win==null || (Interpreter.isBatchMode() && win instanceof ImageWindow)) closeImage(imp); else if (win instanceof PlugInFrame) ((PlugInFrame)win).close(); else if (win instanceof PlugInDialog) ((PlugInDialog)win).close(); else if (win instanceof TextWindow) ((TextWindow)win).close(); else closeImage(imp); }