Пример #1
0
 public Rectangle getRectangle() {
   int windowBarHeight = getWindowBarHeight();
   Size commandBarSize = commandToolBar.getSize();
   Size viewPortSize = viewport.getSize();
   Rectangle rect =
       new Rectangle(
           0,
           windowBarHeight,
           viewPortSize.width,
           viewPortSize.height - windowBarHeight - commandBarSize.height);
   return rect;
 }
Пример #2
0
 public void stackWindows() {
   GWT.log("stackWindows()");
   List<Window> windows = getAllWindows();
   Rectangle rect = getRectangle();
   Size size = viewport.getSize();
   Size windowSize = new Size((int) (size.width * 0.75f), (int) (size.height * 0.75f));
   int windowBarHeight = getWindowBarHeight();
   int index = 0;
   for (Window window : windows) {
     window.setSize(windowSize.width, windowSize.height);
     int x = rect.x + index * windowBarHeight;
     int y = rect.y + index * windowBarHeight;
     window.setPagePosition(x, y);
     index++;
     if (y + windowSize.height > size.height) {
       x = rect.x;
       y = rect.y;
       index = 0;
     }
   }
 }