Subversion Repository Public Repository

litesoft

Diff Revisions 947 vs 948 for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/widgets/SimpleLabel.java

Diff revisions: vs.
  @@ -7,13 +7,11 @@
7 7 import com.google.gwt.user.client.ui.*;
8 8
9 9 public class SimpleLabel extends AbstractBrowserEventListenableWidget implements HasText,
10 - HasWordWrap
11 - {
10 + HasWordWrap {
12 11 /**
13 12 * Creates an empty label.
14 13 */
15 - public SimpleLabel()
16 - {
14 + public SimpleLabel() {
17 15 setElement( DOM.createDiv() );
18 16 //noinspection GWTStyleCheck
19 17 setStyleName( "SimpleLabel" );
  @@ -24,8 +22,7 @@
24 22 *
25 23 * @param text the new label's text
26 24 */
27 - public SimpleLabel( String text )
28 - {
25 + public SimpleLabel( String text ) {
29 26 this();
30 27 setText( text );
31 28 }
  @@ -36,39 +33,33 @@
36 33 * @param text the new label's text
37 34 * @param wordWrap <code>false</code> to disable word wrapping
38 35 */
39 - public SimpleLabel( String text, boolean wordWrap )
40 - {
36 + public SimpleLabel( String text, boolean wordWrap ) {
41 37 this( text );
42 38 setWordWrap( wordWrap );
43 39 }
44 40
45 - public SimpleLabel style( String pStyleClass )
46 - {
41 + public SimpleLabel style( String pStyleClass ) {
47 42 addStyleName( pStyleClass );
48 43 return this;
49 44 }
50 45
51 46 @Override
52 - public String getText()
53 - {
47 + public String getText() {
54 48 return DOM.getInnerText( getElement() );
55 49 }
56 50
57 51 @Override
58 - public void setText( String text )
59 - {
52 + public void setText( String text ) {
60 53 DOM.setInnerText( getElement(), text );
61 54 }
62 55
63 56 @Override
64 - public void setWordWrap( boolean wrap )
65 - {
57 + public void setWordWrap( boolean wrap ) {
66 58 CommonElementHelper.setWhiteSpaceWrap( getElement(), wrap );
67 59 }
68 60
69 61 @Override
70 - public boolean getWordWrap()
71 - {
62 + public boolean getWordWrap() {
72 63 return CommonElementHelper.isWhiteSpaceWrap( getElement() );
73 64 }
74 65 }