Beispiel #1
0
  @Override
  public void layout() {
    checkCache();

    final Rectangle r = container.getClientArea();
    final int[] b = new int[] {r.getX(), r.getY(), r.getWidth(), r.getHeight()};

    final boolean layoutAgain = grid.layout(b, lc.getAlignX(), lc.getAlignY(), false, true);

    if (layoutAgain) {
      grid = null;
      checkCache();
      grid.layout(b, lc.getAlignX(), lc.getAlignY(), false, false);
    }
  }
Beispiel #2
0
 private Dimension getSize(final int type) {
   checkCache();
   final int w = layoutUtil.getSizeSafe(grid != null ? grid.getWidth() : null, type);
   final int h = layoutUtil.getSizeSafe(grid != null ? grid.getHeight() : null, type);
   return new Dimension(w, h);
 }