if ((parent.style & SWT.VIRTUAL) == 0) { int index = parent.indexOf (this); width = Math.max (width, calculateWidth(parent.getItems (null), index, gc, width)); }
int index = parent.indexOf (this); width = Math.max (width, calculateWidth (parent.childIds, index, gc, width));
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);		width = Math.max (width, calculateWidth(parent.getItems (null), index, gc, width));	}	gc.dispose ();	setWidth (width + parent.getInsetWidth (id, true));}