void add(final UIComponent c) { final UILayoutData data = c.getLayoutData(); final LayoutComponent lc = new LayoutComponent(c); lc.firstColumn = currentColumn; lc.firstRow = currentRow; lc.lastColumn = currentColumn; lc.lastRow = currentRow; if (data != null && data instanceof GridLayoutData) { final GridLayoutData gld = (GridLayoutData) data; if (gld.getSpan() > 1) { if (!gld.isWrap()) { nextColumn += gld.getSpan(); } else { nextColumn = 0; nextRow = currentRow + 1; } lc.lastColumn = lc.firstColumn + gld.getSpan() - 1; maxColumn = Math.max(maxColumn, lc.lastColumn); } else { if (gld.isWrap()) { nextColumn = 0; nextRow = currentRow + 1; } else { nextColumn = currentColumn + 1; } } lc.grow = gld.isGrow(); } else { nextColumn = currentColumn + 1; } components.add(lc); if (logger.isLoggable(Level.FINE)) { logger.fine(lc.toString() + " max.col=" + maxColumn); } maxColumn = Math.max(maxColumn, currentColumn); maxRow = Math.max(maxRow, currentRow); currentColumn = nextColumn; currentRow = nextRow; }
public int getComponentHeight() { return Math.max( component.getLocalComponentHeight(), component.getMinimumLocalComponentHeight()); }