public void run() { IJ.wait(50); //sometimes, window layout is done only a few millisec after windowActivated wasActivated = true; } }).start();
public void run() { IJ.wait(50); //sometimes, window layout is done only a few millisec after windowActivated wasActivated = true; } }).start();
/** Called by ImageJ when the user selects Quit. */ public void quit() { quitMacro = IJ.macroRunning(); Thread thread = new Thread(this, "Quit"); thread.setPriority(Thread.NORM_PRIORITY); thread.start(); IJ.wait(10); }
void stopAnimation() { swin.setAnimate(false); IJ.wait(500+(int)(1000.0/animationRate)); }
/** Called by ImageJ when the user selects Quit. */ public void quit() { quitMacro = IJ.macroRunning(); Thread thread = new Thread(this, "Quit"); thread.setPriority(Thread.NORM_PRIORITY); thread.start(); IJ.wait(10); }
public boolean hideZoomIndicator(boolean hide) { boolean hidden = this.hideZoomIndicator; if (!(srcRect.width<imageWidth||srcRect.height<imageHeight)) return hidden; this.hideZoomIndicator = hide; setPaintPending(true); repaint(); long t0 = System.currentTimeMillis(); while(getPaintPending() && (System.currentTimeMillis()-t0)<500L) IJ.wait(10); return hidden; }
public void run() { IJ.wait(50); Dimension size = getSize(); if (size!=null) setSize(size.width+2,size.height+2); firstPaint = false; } });
public boolean hideZoomIndicator(boolean hide) { boolean hidden = this.hideZoomIndicator; if (!(srcRect.width<imageWidth||srcRect.height<imageHeight)) return hidden; this.hideZoomIndicator = hide; setPaintPending(true); repaint(); long t0 = System.currentTimeMillis(); while(getPaintPending() && (System.currentTimeMillis()-t0)<500L) IJ.wait(10); return hidden; }
public void run() { IJ.wait(50); Dimension size = getSize(); if (size!=null) setSize(size.width+2,size.height+2); firstPaint = false; } });
public void itemStateChanged(ItemEvent e) { if (IJ.isMacOSX()) IJ.wait(100); Checkbox cb = (Checkbox)checkboxes.elementAt(2); nointerpolate = cb.getState(); updateSize(); }
public void run() { IJ.wait(100); textArea.insert(variableName, pos); textArea.setCaretPosition(pos+variableName.length()); textArea.requestFocus(); }}).start(); }
public void run() { IJ.wait(100); textArea.insert(variableName, pos); textArea.setCaretPosition(pos+variableName.length()); textArea.requestFocus(); }}).start(); }
public void itemStateChanged(ItemEvent e) { if (IJ.isMacOSX()) IJ.wait(100); Checkbox cb = (Checkbox)checkboxes.elementAt(2); nointerpolate = cb.getState(); updateSize(); }
public void windowActivated(WindowEvent e) { if (IJ.isMacintosh() && !quitting) { IJ.wait(10); // may be needed for Java 1.4 on OS X MenuBar mb = Menus.getMenuBar(); if (mb!=null && mb!=getMenuBar()) { setMenuBar(mb); Menus.setMenuBarCount++; if (IJ.debugMode) IJ.log("setMenuBar: "+Menus.setMenuBarCount); } } }
public void startPaste(ImagePlus clipboard) { IJ.showStatus("Pasting..."); IJ.wait(10); this.clipboard = clipboard; imp.getProcessor().snapshot(); updateClipRect(); imp.draw(clipX, clipY, clipWidth, clipHeight); }
public void startPaste(ImagePlus clipboard) { IJ.showStatus("Pasting..."); IJ.wait(10); this.clipboard = clipboard; imp.getProcessor().snapshot(); updateClipRect(); imp.draw(clipX, clipY, clipWidth, clipHeight); }
public void windowActivated(WindowEvent e) { if (IJ.isMacintosh() && !quitting) { IJ.wait(10); // may be needed for Java 1.4 on OS X MenuBar mb = Menus.getMenuBar(); if (mb!=null && mb!=getMenuBar()) { setMenuBar(mb); Menus.setMenuBarCount++; if (IJ.debugMode) IJ.log("setMenuBar: "+Menus.setMenuBarCount); } } }
public boolean dialogItemChanged(GenericDialog gd, AWTEvent e) { if (IJ.isMacOSX()) IJ.wait(100); if (slices1!=1) slices2 = gd.getNextBoolean()?slices1:1; if (frames1!=1) frames2 = gd.getNextBoolean()?frames1:1; keep = gd.getNextBoolean(); if (!IJ.isMacro()) staticKeep = keep; ((Label)gd.getMessage()).setText(getNewDimensions()); return true; }
public boolean dialogItemChanged(GenericDialog gd, AWTEvent e) { if (IJ.isMacOSX()) IJ.wait(100); if (channels1!=1) channels2 = gd.getNextBoolean()?channels1:1; if (slices1!=1) slices2 = gd.getNextBoolean()?slices1:1; if (frames1!=1) frames2 = gd.getNextBoolean()?frames1:1; keep = gd.getNextBoolean(); ((Label)gd.getMessage()).setText(getNewDimensions()); return true; }
public boolean dialogItemChanged(GenericDialog gd, AWTEvent e) { if (IJ.isMacOSX()) IJ.wait(100); if (channels1!=1) channels2 = gd.getNextBoolean()?channels1:1; if (slices1!=1) slices2 = gd.getNextBoolean()?slices1:1; if (frames1!=1) frames2 = gd.getNextBoolean()?frames1:1; keep = gd.getNextBoolean(); ((Label)gd.getMessage()).setText(getNewDimensions()); return true; }