if (wordWrap) { layout.setWidth(wHint == 0 ? 1 : wHint); }
if (wordWrap) layout.setWidth(wHint == 0 ? 1 : wHint);
public Point computeSize (int wHint, int hHint, boolean changed) {	checkWidget();	boolean singleLine = (getStyle() & SWT.SINGLE) != 0;	int lineCount = singleLine ? 1 : content.getLineCount();	int width = 0;	int height = 0;	if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) {		Display display = getDisplay();		int maxHeight = display.getClientArea().height;		int lineIndex = 0;		while (lineIndex < lineCount && height < maxHeight) {			TextLayout layout = renderer.getTextLayout(lineIndex);			if (wordWrap) {				layout.setWidth(wHint == 0 ? 1 : wHint);			}			Rectangle rect = layout.getBounds();			height += rect.height;			width = Math.max(width, rect.width);			renderer.disposeTextLayout(layout);			lineIndex++;		}	}	// Use default values if no text is defined.	if (width == 0) width = DEFAULT_WIDTH;	if (height == 0) height = DEFAULT_HEIGHT;	if (wHint != SWT.DEFAULT) width = wHint;	if (hHint != SWT.DEFAULT) height = hHint;	int wTrim = leftMargin + rightMargin + getCaretWidth();	int hTrim = topMargin + bottomMargin;	Rectangle rect = computeTrim(0, 0, width + wTrim, height + hTrim);	return new Point (rect.width, rect.height);}