Overrides ImagePlus.show().
()
| 483 | |
| 484 | /** Overrides ImagePlus.show(). */ |
| 485 | public void show() { |
| 486 | img = ip.createImage(); |
| 487 | ImageCanvas ic = new PlotsCanvas(this); |
| 488 | win = new ImageWindow(this, ic); |
| 489 | IJ.showStatus(""); |
| 490 | if (ic.getMagnification()==1.0) |
| 491 | return; |
| 492 | while(ic.getMagnification()<1.0) |
| 493 | ic.zoomIn(0,0); |
| 494 | Point loc = win.getLocation(); |
| 495 | int w = getWidth()+20; |
| 496 | int h = getHeight()+30; |
| 497 | Dimension screen = IJ.getScreenSize(); |
| 498 | if (loc.x+w>screen.width) |
| 499 | w = screen.width-loc.x-20; |
| 500 | if (loc.y+h>screen.height) |
| 501 | h = screen.height-loc.y-30; |
| 502 | win.setSize(w, h); |
| 503 | win.validate(); |
| 504 | repaintWindow(); |
| 505 | } |
| 506 | |
| 507 | } |
| 508 |
no test coverage detected