if (preferredWidth > -1) return new Point(preferredWidth, preferredHeight); int width = MINIMUM_WIDTH; int height = DEFAULT_HEIGHT; if (wHint != SWT.DEFAULT) width = wHint + MINIMUM_WIDTH + MARGIN_WIDTH; if (hHint != SWT.DEFAULT) height = hHint + (2 + MARGIN_HEIGHT);
int width = wHint, height = hHint; if (wHint == SWT.DEFAULT) width = 32; if (hHint == SWT.DEFAULT) height = 32; width += MINIMUM_WIDTH + MARGIN_WIDTH; height += 2 * MARGIN_HEIGHT;
public Point computeSize (int wHint, int hHint) {	checkWidget();	if (preferredWidth > -1) return new Point(preferredWidth, preferredHeight);	int width = MINIMUM_WIDTH;	int height = DEFAULT_HEIGHT;	if (wHint != SWT.DEFAULT) width = wHint + MINIMUM_WIDTH + MARGIN_WIDTH; 	if (hHint != SWT.DEFAULT) height = hHint + (2 + MARGIN_HEIGHT);	return new Point (width, height);}