litesoft
Diff Revisions
947
vs
948
for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/widgets/NeverEmptyHtmlEscapingLabel.java
|
@@ -10,56 +10,46 @@ |
10 |
10 |
|
* <p/> |
11 |
11 |
|
* Note: while it extends an HTML widget, you may NOT set the HTML, only the text! |
12 |
12 |
|
*/ |
13 |
|
- |
public class NeverEmptyHtmlEscapingLabel extends HTML implements StyledSafeTextSink |
14 |
|
- |
{ |
15 |
|
- |
public NeverEmptyHtmlEscapingLabel() |
16 |
|
- |
{ |
|
13 |
+ |
public class NeverEmptyHtmlEscapingLabel extends HTML implements StyledSafeTextSink { |
|
14 |
+ |
public NeverEmptyHtmlEscapingLabel() { |
17 |
15 |
|
this( null ); |
18 |
16 |
|
} |
19 |
17 |
|
|
20 |
|
- |
public NeverEmptyHtmlEscapingLabel( String text ) |
21 |
|
- |
{ |
|
18 |
+ |
public NeverEmptyHtmlEscapingLabel( String text ) { |
22 |
19 |
|
setText( text ); |
23 |
20 |
|
} |
24 |
21 |
|
|
25 |
22 |
|
@Override |
26 |
|
- |
public void setText( String text ) |
27 |
|
- |
{ |
|
23 |
+ |
public void setText( String text ) { |
28 |
24 |
|
super.setHTML( SafeHtmlizer.getInstance().noEmpty1stLine( text ).asString() ); |
29 |
25 |
|
} |
30 |
26 |
|
|
31 |
27 |
|
@Override |
32 |
|
- |
public void setText( String text, Direction dir ) |
33 |
|
- |
{ |
|
28 |
+ |
public void setText( String text, Direction dir ) { |
34 |
29 |
|
super.setHTML( SafeHtmlizer.getInstance().noEmpty1stLine( text ), dir ); |
35 |
30 |
|
} |
36 |
31 |
|
|
37 |
32 |
|
@Override |
38 |
|
- |
public void setHTML( String html ) |
39 |
|
- |
{ |
|
33 |
+ |
public void setHTML( String html ) { |
40 |
34 |
|
unsupported(); |
41 |
35 |
|
} |
42 |
36 |
|
|
43 |
37 |
|
@Override |
44 |
|
- |
public void setHTML( String html, Direction dir ) |
45 |
|
- |
{ |
|
38 |
+ |
public void setHTML( String html, Direction dir ) { |
46 |
39 |
|
unsupported(); |
47 |
40 |
|
} |
48 |
41 |
|
|
49 |
42 |
|
@Override |
50 |
|
- |
public void setHTML( SafeHtml html ) |
51 |
|
- |
{ |
|
43 |
+ |
public void setHTML( SafeHtml html ) { |
52 |
44 |
|
unsupported(); |
53 |
45 |
|
} |
54 |
46 |
|
|
55 |
47 |
|
@Override |
56 |
|
- |
public void setHTML( SafeHtml html, Direction dir ) |
57 |
|
- |
{ |
|
48 |
+ |
public void setHTML( SafeHtml html, Direction dir ) { |
58 |
49 |
|
unsupported(); |
59 |
50 |
|
} |
60 |
51 |
|
|
61 |
|
- |
private void unsupported() |
62 |
|
- |
{ |
|
52 |
+ |
private void unsupported() { |
63 |
53 |
|
throw new UnsupportedOperationException( "setting HTML directly NOT supported on OurLabel - use setText()" ); |
64 |
54 |
|
} |
65 |
55 |
|
} |