int trimWidth = width + borderLeft + borderRight + 2*marginWidth; int trimHeight = height + borderTop + borderBottom + 2*marginHeight + tabHeight; return new Rectangle (trimX, trimY, trimWidth, trimHeight);
public Rectangle computeTrim (int x, int y, int width, int height) {	checkWidget();	int tabHeight = getTabHeight();	int trimX = x - marginWidth - borderLeft;	int trimY = y - marginHeight - tabHeight - borderTop;	if (onBottom) {		trimY = y - marginHeight - borderTop;	}	int trimWidth = width + borderLeft + borderRight + 2*marginWidth;	int trimHeight = height + borderTop + borderBottom + 2*marginHeight + tabHeight;	return new Rectangle (trimX, trimY, trimWidth, trimHeight);}