columnWidth = Math.max (columnWidth, items [i].calculateWidth (0, gc));
TreeItem item = items [i]; if (item != null && item.parentItem == null) { columnWidth = Math.max (columnWidth, items [i].calculateWidth (0, gc)); }
public Point computeSize (int wHint, int hHint, boolean changed) {	checkWidget ();	int width = 0;	if (wHint == SWT.DEFAULT) {		if (columnCount != 0) {			for (int i=0; i<columnCount; i++) {				width += columns [i].getWidth ();			}		} else {			int columnWidth = 0;			GC gc = new GC (this);			TreeItem [] items = getItems (null);			for (int i=0; i<items.length; i++) {				columnWidth = Math.max (columnWidth, items [i].calculateWidth (0, gc));			}			gc.dispose ();			width += columnWidth + getInsetWidth (column_id, true);		}		if ((style & SWT.CHECK) != 0) width += getCheckColumnWidth ();	} else {		width = wHint;	}	if (width <= 0) width = DEFAULT_WIDTH;	int height = 0;	if (hHint == SWT.DEFAULT) {		height = getItemCount () * getItemHeight () + getHeaderHeight();	} else {		height = hHint;	}	if (height <= 0) height = DEFAULT_HEIGHT;	Rectangle rect = computeTrim (0, 0, width, height);	return new Point (rect.width, rect.height);}