Пример #1
0
 /** Tile all internal frames */
 public void tileFrames() {
   java.awt.Component allFrames[] = getAllFrames();
   manager.setNormalSize();
   int frameHeight = getBounds().height / allFrames.length;
   int y = 0;
   for (int i = 0; i < allFrames.length; i++) {
     allFrames[i].setSize(getBounds().width, frameHeight);
     allFrames[i].setLocation(0, y);
     y = y + frameHeight;
   }
 }
Пример #2
0
  /** Cascade all internal frames */
  public void cascadeFrames() {
    int x = 0;
    int y = 0;
    JInternalFrame allFrames[] = getAllFrames();

    manager.setNormalSize();
    int frameHeight = (getBounds().height - 5) - allFrames.length * FRAME_OFFSET;
    int frameWidth = (getBounds().width - 5) - allFrames.length * FRAME_OFFSET;
    for (int i = allFrames.length - 1; i >= 0; i--) {
      allFrames[i].setSize(frameWidth, frameHeight);
      allFrames[i].setLocation(x, y);
      x = x + FRAME_OFFSET;
      y = y + FRAME_OFFSET;
    }
  }
Пример #3
0
 private void checkDesktopSize() {
   if (getParent() != null && isVisible()) {
     manager.resizeDesktop();
   }
 }