if ((parent.style & SWT.VIRTUAL) == 0) { int index = parent.indexOf (this); for (int i=0; i<parent.itemCount; i++) { TableItem item = parent.items [i]; if (item != null) { width = Math.max (width, item.calculateWidth (index, gc)); }
int index = parent.indexOf (this); for (int i=0; i<parent.itemCount; i++) { TableItem item = parent.items [i]; if (item != null && item.cached) { width = Math.max (width, item.calculateWidth (index, gc));
public void pack () {	checkWidget ();	GC gc = new GC (parent);	int width = gc.stringExtent (text).x;	if (iconRef != 0 || (image != null && OS.VERSION >= 0x1040)) {		/* Note that the image is stretched to the header height */		width += parent.headerHeight;		if (text.length () != 0) width += parent.getGap ();	}	if ((parent.style & SWT.VIRTUAL) == 0) {		int index = parent.indexOf (this);		for (int i=0; i<parent.itemCount; i++) {			TableItem item = parent.items [i];			if (item != null) {				width = Math.max (width, item.calculateWidth (index, gc));			}		}	}	gc.dispose ();	setWidth (width + parent.getInsetWidth ());}