if (oldImage != null && image != null) { Rectangle oldBounds = oldImage.getBounds(); Rectangle bounds = image.getBounds(); if (bounds.width == oldBounds.width && bounds.height == oldBounds.height) { if (isShowing()) parent.redraw(x, y, width, height, false); return; } }
public void setImage (Image image) {	checkWidget();	if (image != null && image.isDisposed ()) {		SWT.error(SWT.ERROR_INVALID_ARGUMENT);	}	Image oldImage = getImage();	if (image == null && oldImage == null) return;	if (image != null && image.equals(oldImage)) return;	super.setImage(image);	if (!parent.updateTabHeight(false)) {		parent.updateItems();		parent.redrawTabs();	}}