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

Method positionWindow

ij/src/main/java/ij/plugin/frame/Editor.java:326–341  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

324 }
325
326 public void positionWindow() {
327 Dimension screen = IJ.getScreenSize();
328 Dimension window = getSize();
329 if (window.width==0)
330 return;
331 int left = screen.width/2-window.width/2;
332 int top = screen.height/(IJ.isWindows()?6:5);
333 if (IJ.isMacOSX())
334 top = (screen.height-window.height)/4;
335 if (top<0) top = 0;
336 if (nWindows<=0 || xoffset>8*XINC)
337 {xoffset=0; yoffset=0;}
338 setLocation(left+xoffset, top+yoffset);
339 xoffset+=XINC; yoffset+=YINC;
340 nWindows++;
341 }
342
343 void setWindowTitle(String title) {
344 Menus.updateWindowMenuItem(getTitle(), title);

Callers 1

EditorMethod · 0.95

Calls 5

getScreenSizeMethod · 0.95
isWindowsMethod · 0.95
isMacOSXMethod · 0.95
getSizeMethod · 0.65
setLocationMethod · 0.45

Tested by

no test coverage detected