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; int [] result = layout (width, height, false); Point extent = new Point (result [1], result [2]); if (wHint != SWT.DEFAULT) extent.x = wHint; if (hHint != SWT.DEFAULT) extent.y = hHint; Rectangle trim = computeTrim (0, 0, extent.x, extent.y); return new Point (trim.width, trim.height); }
item.resizeControl(); Rectangle trim = computeTrim( 0, 0, width, height ); width = trim.width; height = trim.height;