litesoft
Diff Revisions
947
vs
948
for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/widgets/TextAreaChangeListenable.java
|
@@ -6,17 +6,14 @@ |
6 |
6 |
|
import com.google.gwt.user.client.*; |
7 |
7 |
|
import com.google.gwt.user.client.ui.*; |
8 |
8 |
|
|
9 |
|
- |
public class TextAreaChangeListenable extends TextArea implements IFocusWidget |
10 |
|
- |
{ |
11 |
|
- |
public TextAreaChangeListenable( int pInitialWidth, int pInitialLines, boolean pNoWrap ) |
12 |
|
- |
{ |
|
9 |
+ |
public class TextAreaChangeListenable extends TextArea implements IFocusWidget { |
|
10 |
+ |
public TextAreaChangeListenable( int pInitialWidth, int pInitialLines, boolean pNoWrap ) { |
13 |
11 |
|
setCharacterWidth( pInitialWidth ); |
14 |
12 |
|
setVisibleLines( pInitialLines ); |
15 |
13 |
|
mHelper = new TextAreaSupport( this, pNoWrap ); |
16 |
14 |
|
} |
17 |
15 |
|
|
18 |
|
- |
public TextAreaChangeListenable( Integer pInitialWidth, Integer pInitialLines, boolean pNoWrap ) |
19 |
|
- |
{ |
|
16 |
+ |
public TextAreaChangeListenable( Integer pInitialWidth, Integer pInitialLines, boolean pNoWrap ) { |
20 |
17 |
|
this( (pInitialWidth != null) ? pInitialWidth.intValue() : 40, // |
21 |
18 |
|
(pInitialLines != null) ? pInitialLines.intValue() : 4, // |
22 |
19 |
|
pNoWrap ); |
|
@@ -25,33 +22,29 @@ |
25 |
22 |
|
TextBoxBaseChangeListenableHelper mHelper; |
26 |
23 |
|
|
27 |
24 |
|
@Override |
28 |
|
- |
protected void onDetach() |
29 |
|
- |
{ |
|
25 |
+ |
protected void onDetach() { |
30 |
26 |
|
super.onDetach(); |
31 |
27 |
|
mHelper.onDetach(); |
32 |
28 |
|
} |
33 |
29 |
|
|
34 |
|
- |
@Override public void setEnabled( boolean enabled ) |
35 |
|
- |
{ |
|
30 |
+ |
@Override |
|
31 |
+ |
public void setEnabled( boolean enabled ) { |
36 |
32 |
|
DOM.setElementPropertyBoolean( getElement(), "readOnly", !enabled ); |
37 |
33 |
|
} |
38 |
34 |
|
|
39 |
35 |
|
@Override |
40 |
|
- |
public void setText( String text ) |
41 |
|
- |
{ |
|
36 |
+ |
public void setText( String text ) { |
42 |
37 |
|
super.setText( text ); |
43 |
38 |
|
mHelper.setText( text ); |
44 |
39 |
|
} |
45 |
40 |
|
|
46 |
41 |
|
@Override |
47 |
|
- |
public void setCharacterWidth( int width ) |
48 |
|
- |
{ |
|
42 |
+ |
public void setCharacterWidth( int width ) { |
49 |
43 |
|
super.setCharacterWidth( width < 20 ? 20 : width ); |
50 |
44 |
|
} |
51 |
45 |
|
|
52 |
46 |
|
@Override |
53 |
|
- |
public void setVisibleLines( int lines ) |
54 |
|
- |
{ |
|
47 |
+ |
public void setVisibleLines( int lines ) { |
55 |
48 |
|
super.setVisibleLines( lines < 2 ? 2 : lines ); |
56 |
49 |
|
} |
57 |
50 |
|
} |