if (index != 0 || (index == 0 && this.width == -1)) { int width = 0;
int width = this.width; if (index != 0 || (index == 0 && width == -1)) {
int calculateWidth (int index, GC gc) {	if (index != 0 || (index == 0 && this.width == -1)) {		int width = 0;		Image image = getImage (index);		String text = getText (index);		if (image != null) width += image.getBounds ().width + parent.getGap ();		if (text != null && text.length () > 0) width += gc.stringExtent (text).x;		if (parent.hooks (SWT.MeasureItem)) {			Event event = new Event ();			event.item = this;			event.index = index;			event.gc = gc;			Rectangle bounds = getBounds (index);			event.width = width;			event.height = bounds.height;			parent.sendEvent (SWT.MeasureItem, event);			if (parent.itemHeight == -1) {				parent.itemHeight = event.height;				OS.SetDataBrowserTableViewRowHeight (parent.handle, (short) event.height);			}			width = event.width;		}		if (index == 0) this.width = width;	}	return this.width;}