Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 160380
Collapse All | Expand All

(-)src/org/eclipse/gmf/runtime/draw2d/ui/figures/WrapLabel.java (-2 / +3 lines)
Lines 1134-1140 Link Here
1134
		int textWidth = getTextExtents(subString, f, fontHeight).width;
1134
		int textWidth = getTextExtents(subString, f, fontHeight).width;
1135
		Point p = getTextLocation();
1135
		Point p = getTextLocation();
1136
		int y = p.y;
1136
		int y = p.y;
1137
		int x = p.x;
1137
		int x = p.x, xRef = x;
1138
		final int wrapAlignment = getTextWrapAlignment();
1138
		final int wrapAlignment = getTextWrapAlignment();
1139
		boolean isUnderlined = isTextUnderlined();
1139
		boolean isUnderlined = isTextUnderlined();
1140
		boolean isStrikedThrough = isTextStrikedThrough();
1140
		boolean isStrikedThrough = isTextStrikedThrough();
Lines 1150-1156 Link Here
1150
		while (tokenizer.hasMoreTokens()) {
1150
		while (tokenizer.hasMoreTokens()) {
1151
			String token = tokenizer.nextToken();
1151
			String token = tokenizer.nextToken();
1152
			int tokenWidth = getTextExtents(token, f, fontHeight).width;
1152
			int tokenWidth = getTextExtents(token, f, fontHeight).width;
1153
			
1153
            
1154
			x = xRef;
1154
			switch (wrapAlignment) {
1155
			switch (wrapAlignment) {
1155
				case CENTER:
1156
				case CENTER:
1156
					x += (textWidth - tokenWidth) / 2;
1157
					x += (textWidth - tokenWidth) / 2;

Return to bug 160380