litesoft
Diff Revisions
949
vs
950
for /trunk/GWT_Sandbox/FormEngine/src/com/temp/client/foundation/widget/WrappingLabel.java
|
@@ -1,35 +1,35 @@ |
1 |
|
- |
package com.temp.client.foundation.widget; |
2 |
|
- |
|
3 |
|
- |
import com.temp.client.foundation.widget.input.support.*; |
4 |
|
- |
import com.temp.shared.utils.*; |
5 |
|
- |
|
6 |
|
- |
/** |
7 |
|
- |
* This Widget is a wrapper around a GWT HTML (Label). |
8 |
|
- |
* <p/> |
9 |
|
- |
* Its key features are: |
10 |
|
- |
* <ul> |
11 |
|
- |
* <li>Leading and trailing whitespace is removed</li> |
12 |
|
- |
* <li>Text can wrap because embedded spaces are left as spaces (ig the next character is not a space)</li> |
13 |
|
- |
* </ul> |
14 |
|
- |
*/ |
15 |
|
- |
public class WrappingLabel extends TextLabel { |
16 |
|
- |
public WrappingLabel() { |
17 |
|
- |
initWidget( htmlWidget ); |
18 |
|
- |
} |
19 |
|
- |
|
20 |
|
- |
/** |
21 |
|
- |
* @param text can be null and can have white space |
22 |
|
- |
*/ |
23 |
|
- |
public WrappingLabel( String text ) { |
24 |
|
- |
this(); |
25 |
|
- |
setText( text ); |
26 |
|
- |
} |
27 |
|
- |
|
28 |
|
- |
/** |
29 |
|
- |
* @param text will NOT be null or have any leading/trailing whitespace? |
30 |
|
- |
*/ |
31 |
|
- |
@Override |
32 |
|
- |
protected String normalizeHTML( String text ) { |
33 |
|
- |
return SafeHtmlizer.getInstance().noEmptyLeaveSomeSpaces( text ); |
34 |
|
- |
} |
35 |
|
- |
} |
|
1 |
+ |
package com.temp.client.foundation.widget; |
|
2 |
+ |
|
|
3 |
+ |
import com.temp.client.foundation.widget.input.support.*; |
|
4 |
+ |
import com.temp.shared.utils.*; |
|
5 |
+ |
|
|
6 |
+ |
/** |
|
7 |
+ |
* This Widget is a wrapper around a GWT HTML (Label). |
|
8 |
+ |
* <p/> |
|
9 |
+ |
* Its key features are: |
|
10 |
+ |
* <ul> |
|
11 |
+ |
* <li>Leading and trailing whitespace is removed</li> |
|
12 |
+ |
* <li>Text can wrap because embedded spaces are left as spaces (ig the next character is not a space)</li> |
|
13 |
+ |
* </ul> |
|
14 |
+ |
*/ |
|
15 |
+ |
public class WrappingLabel extends TextLabel { |
|
16 |
+ |
public WrappingLabel() { |
|
17 |
+ |
initWidget( htmlWidget ); |
|
18 |
+ |
} |
|
19 |
+ |
|
|
20 |
+ |
/** |
|
21 |
+ |
* @param text can be null and can have white space |
|
22 |
+ |
*/ |
|
23 |
+ |
public WrappingLabel( String text ) { |
|
24 |
+ |
this(); |
|
25 |
+ |
setText( text ); |
|
26 |
+ |
} |
|
27 |
+ |
|
|
28 |
+ |
/** |
|
29 |
+ |
* @param text will NOT be null or have any leading/trailing whitespace? |
|
30 |
+ |
*/ |
|
31 |
+ |
@Override |
|
32 |
+ |
protected String normalizeHTML( String text ) { |
|
33 |
+ |
return SafeHtmlizer.getInstance().noEmptyLeaveSomeSpaces( text ); |
|
34 |
+ |
} |
|
35 |
+ |
} |