MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / updateImage

Method updateImage

ij/src/main/java/ij/gui/ImageWindow.java:542–562  ·  view source on GitHub ↗
(ImagePlus imp)

Source from the content-addressed store, hash-verified

540 }
541
542 public void updateImage(ImagePlus imp) {
543 if (imp!=this.imp)
544 throw new IllegalArgumentException("imp!=this.imp");
545 this.imp = imp;
546 ic.updateImage(imp);
547 setLocationAndSize(true);
548 if (this instanceof StackWindow) {
549 StackWindow sw = (StackWindow)this;
550 int stackSize = imp.getStackSize();
551 int nScrollbars = sw.getNScrollbars();
552 if (stackSize==1 && nScrollbars>0)
553 sw.removeScrollbars();
554 else if (stackSize>1 && nScrollbars==0)
555 sw.addScrollbars(imp);
556 }
557 pack();
558 repaint();
559 maxBounds = getMaximumBounds();
560 setMaximizedBounds(maxBounds);
561 setMaxBoundsTime = System.currentTimeMillis();
562 }
563
564 public ImageCanvas getCanvas() {
565 return ic;

Callers 1

setFrozenMethod · 0.95

Calls 7

setLocationAndSizeMethod · 0.95
getNScrollbarsMethod · 0.95
removeScrollbarsMethod · 0.95
addScrollbarsMethod · 0.95
getMaximumBoundsMethod · 0.95
getStackSizeMethod · 0.45
repaintMethod · 0.45

Tested by

no test coverage detected