int trimWidth = trimWidth (), trimHeight = trimHeight (); trim.x -= trimWidth / 2; trim.y -= trimHeight - (trimWidth / 2); trim.width += trimWidth; trim.height += trimHeight + imeHeight ();
int border = 0; if ((style & (SWT.NO_TRIM | SWT.BORDER | SWT.RESIZE)) == 0) { int [] argList = {OS.XmNborderWidth, 0}; OS.XtGetValues (handle, argList, argList.length / 2); border = argList [1]; } trim.x -= trimLeft (); trim.y -= trimTop (); trim.width += trimWidth () + (border * 2); trim.height += trimHeight () + imeHeight () + (border * 2);
public Rectangle computeTrim (int x, int y, int width, int height) {	checkWidget();	Rectangle trim = super.computeTrim (x, y, width, height);	int trimWidth = trimWidth (), trimHeight = trimHeight ();	trim.x -= trimWidth / 2; trim.y -= trimHeight - (trimWidth / 2);	trim.width += trimWidth; trim.height += trimHeight + imeHeight ();	return trim;}