Subversion Repository Public Repository

litesoft

Diff Revisions 947 vs 948 for /trunk/GWT_Sandbox/FormEngine/src/com/temp/client/foundation/widget/ClippingLabel.java

Diff revisions: vs.
  @@ -1,38 +1,34 @@
1 1 package com.temp.client.foundation.widget;
2 2
3 - import com.google.gwt.dom.client.Style;
3 + import com.google.gwt.dom.client.*;
4 4 import com.temp.client.foundation.widget.input.support.*;
5 - import com.temp.shared.utils.SafeHtmlizer;
5 + import com.temp.shared.utils.*;
6 6
7 7 /**
8 8 * This Widget is a wrapper around a GWT HTML (Label).
9 - *
9 + * <p/>
10 10 * Its key features are:
11 11 * <ul>
12 12 * <li>Leading and trailing whitespace is removed</li>
13 13 * <li>Text will be clipped</li>
14 14 * </ul>
15 15 */
16 - public class ClippingLabel extends TextLabel
17 - {
18 - public ClippingLabel()
19 - {
16 + public class ClippingLabel extends TextLabel {
17 + public ClippingLabel() {
20 18 initWidget( htmlWidget );
21 - htmlWidget.getElement().getStyle().setOverflow(Style.Overflow.HIDDEN);
19 + htmlWidget.getElement().getStyle().setOverflow( Style.Overflow.HIDDEN );
22 20 }
23 21
24 - public ClippingLabel(String text)
25 - {
22 + public ClippingLabel( String text ) {
26 23 this();
27 - setText(text);
24 + setText( text );
28 25 }
29 26
30 27 /**
31 28 * @param text will NOT be null or have any leading/trailing whitespace
32 29 */
33 30 @Override
34 - protected String normalizeHTML( String text )
35 - {
36 - return SafeHtmlizer.getInstance().noEmpty(text);
31 + protected String normalizeHTML( String text ) {
32 + return SafeHtmlizer.getInstance().noEmpty( text );
37 33 }
38 34 }