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