public void maximize() { if (GenericDialog.getInstance()!=null) return; // workaround for OSX/Java 8 maximize bug Rectangle rect = getMaximumBounds(); if (IJ.debugMode) IJ.log("maximize: "+rect); setLocationAndSize(rect.x, rect.y, rect.width, rect.height); }
public void maximize() { if (GenericDialog.getInstance()!=null) return; // workaround for OSX/Java 8 maximize bug Rectangle rect = getMaximumBounds(); if (IJ.debugMode) IJ.log("maximize: "+rect); setLocationAndSize(rect.x, rect.y, rect.width, rect.height); }
public void updateImage(ImagePlus imp) { if (imp!=this.imp) throw new IllegalArgumentException("imp!=this.imp"); this.imp = imp; ic.updateImage(imp); setLocationAndSize(true); if (this instanceof StackWindow) { StackWindow sw = (StackWindow)this; int stackSize = imp.getStackSize(); int nScrollbars = sw.getNScrollbars(); if (stackSize==1 && nScrollbars>0) sw.removeScrollbars(); else if (stackSize>1 && nScrollbars==0) sw.addScrollbars(imp); } pack(); repaint(); maxBounds = getMaximumBounds(); setMaximizedBounds(maxBounds); setMaxBoundsTime = System.currentTimeMillis(); }
public void updateImage(ImagePlus imp) { if (imp!=this.imp) throw new IllegalArgumentException("imp!=this.imp"); this.imp = imp; ic.updateImage(imp); setLocationAndSize(true); if (this instanceof StackWindow) { StackWindow sw = (StackWindow)this; int stackSize = imp.getStackSize(); int nScrollbars = sw.getNScrollbars(); if (stackSize==1 && nScrollbars>0) sw.removeScrollbars(); else if (stackSize>1 && nScrollbars==0) sw.addScrollbars(imp); } pack(); repaint(); maxBounds = getMaximumBounds(); setMaximizedBounds(maxBounds); setMaxBoundsTime = System.currentTimeMillis(); }
void setLocation() { int x = (int)getFirstArg(); int y = (int)getNextArg(); int width=0, height=0; if (interp.nextToken()==',') { width = (int)getNextArg(); height = (int)getNextArg(); } interp.getRightParen(); if (width==0&&height==0) { Window win = WindowManager.getActiveWindow(); if (win!=null) win.setLocation(x, y); } else { ImagePlus imp = getImage(); ImageWindow win = imp.getWindow(); if (win!=null) win.setLocationAndSize(x, y, width, height); } }
void setLocation() { int x = (int)getFirstArg(); int y = (int)getNextArg(); int width=0, height=0; if (interp.nextToken()==',') { width = (int)getNextArg(); height = (int)getNextArg(); } interp.getRightParen(); if (width==0&&height==0) { Window win = WindowManager.getActiveWindow(); if (win!=null) win.setLocation(x, y); } else { ImagePlus imp = getImage(); ImageWindow win = imp.getWindow(); if (win!=null) win.setLocationAndSize(x, y, width, height); } }
impFeature1.updateAndDraw(); impFeature1.show(); impFeature1.getWindow().setLocationAndSize( impFeature1.getWindow().getX(), impFeature1.getWindow().getY(), impFeature2.updateAndDraw(); impFeature2.show(); impFeature2.getWindow().setLocationAndSize( impFeature2.getWindow().getX(), impFeature2.getWindow().getY(),
impFeature1.updateAndDraw(); impFeature1.show(); impFeature1.getWindow().setLocationAndSize( impFeature1.getWindow().getX(), impFeature1.getWindow().getY(), impFeature2.updateAndDraw(); impFeature2.show(); impFeature2.getWindow().setLocationAndSize( impFeature2.getWindow().getX(), impFeature2.getWindow().getY(),
setLocationAndSize(false); else ic.update(previousWindow.getCanvas()); WindowManager.setCurrentWindow(this); } else { setLocationAndSize(false); if (ij!=null && !IJ.isMacintosh()) { Image img = ij.getIconImage();
setLocationAndSize(false); else ic.update(previousWindow.getCanvas()); WindowManager.setCurrentWindow(this); } else { setLocationAndSize(false); if (ij!=null && !IJ.isMacintosh()) { Image img = ij.getIconImage();