if (rect == null) error (SWT.ERROR_NULL_ARGUMENT); setBounds (rect.x, rect.y, rect.width, rect.height);
boolean samePosition, sameExtent; samePosition = (this.x == x) && (this.y == y); sameExtent = (this.width == width) && (this.height == height); if ((samePosition) && (sameExtent)) return; if (isShowing) hideCaret (); this.x = x; this.y = y; this.width = width; this.height = height; if (sameExtent) { moved = true; if (isVisible ()) { moved = false; parent.updateCaret (); } } else { resized = true; if (isVisible ()) { moved = false; parent.updateCaret (); resized = false; } } if (isShowing) showCaret ();
public void setBounds (Rectangle rect) {	checkWidget();	if (rect == null) error (SWT.ERROR_NULL_ARGUMENT);	setBounds (rect.x, rect.y, rect.width, rect.height);}