Exemple #1
0
  public void layoutContainer(Container obj) {
    Rectangle r = obj.bounds();
    int width = r.width - TF_LEFT + TF_RIGHT;
    if (width < 0) return;

    int height = r.height - TF_TOP + TF_BOTTOM;
    if (height < 0) return;

    int col = TF_LEFT;
    int row = 0;

    if (iTabsPosition == TOP) row = TF_TOP;
    else row = TF_TOP - TF_BTN_HEIGHT;

    oobj.move(col + 1, row + 1);

    // oobj.move(0,0);
    oobj.resize(width - 3, height - 3);

    if (iTabsPosition == TOP) {

      dbLeft.move(r.width - 33 + TF_RIGHT, TF_TOP - 16);
      dbRight.move(r.width - 16 + TF_RIGHT, TF_TOP - 16);
      dbLeft.resize(16, 15);
      dbRight.resize(16, 15);
    } else {
      dbLeft.move(r.width - 33 + TF_RIGHT, r.height + TF_BOTTOM - TF_BTN_HEIGHT);
      dbRight.move(r.width - 16 + TF_RIGHT, r.height + TF_BOTTOM - TF_BTN_HEIGHT);
      dbLeft.resize(16, 15);
      dbRight.resize(16, 15);
    }
    repaint();
  }