int width = wHint, height = hHint; if (wHint == SWT.DEFAULT) width = 0x7FFFFFFF; if (hHint == SWT.DEFAULT) height = 0x7FFFFFFF; Point extent = layout (width, false); if (wHint != SWT.DEFAULT) extent.x = wHint; if (hHint != SWT.DEFAULT) extent.y = hHint; return extent;
Vector row; int height = 0, width = 0, rowWidth = 0; for (int i = 0; i < rows.size(); i++) { row = (Vector)rows.elementAt(i); for (int j = 0; j < row.size(); j++) { Point size = ((CoolItem) row.elementAt(j)).computeSize(SWT.DEFAULT, SWT.DEFAULT); rowWidth += size.x; } width = Math.max(width, rowWidth); height += getRowHeight(i) + ROW_SPACING; rowWidth = 0; } if (wHint != SWT.DEFAULT) width = wHint; if (hHint != SWT.DEFAULT) height = hHint; int borders = getBorderWidth() * 2; return new Point(width + borders, height + borders);
public Point computeSize (int wHint, int hHint, boolean changed) {	checkWidget();	int width = wHint, height = hHint;	if (wHint == SWT.DEFAULT) width = 0x7FFFFFFF;	if (hHint == SWT.DEFAULT) height = 0x7FFFFFFF;	Point extent = layout (width, false);	if (wHint != SWT.DEFAULT) extent.x = wHint;	if (hHint != SWT.DEFAULT) extent.y = hHint;	return extent;}