Subversion Repository Public Repository

litesoft

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

Diff revisions: vs.
  @@ -6,25 +6,21 @@
6 6 import com.google.gwt.user.client.*;
7 7 import com.google.gwt.user.client.ui.*;
8 8
9 - public class SizeableTextArea extends AbstractSizeableTextBoxBase
10 - {
9 + public class SizeableTextArea extends AbstractSizeableTextBoxBase {
11 10 protected TextAreaChangeListenable mTextArea;
12 11
13 - public SizeableTextArea( boolean pNoWrap )
14 - {
12 + public SizeableTextArea( boolean pNoWrap ) {
15 13 mTextArea = new TextAreaChangeListenable( 40, 4, pNoWrap );
16 14 initWidget( new ConstrainingSizeableOuterLayers( mTextArea, "LayoutSizeableTextArea" ) );
17 15 LLstretchable();
18 16 }
19 17
20 18 @Override
21 - protected TextBoxBase getTextBoxBase()
22 - {
19 + protected TextBoxBase getTextBoxBase() {
23 20 return mTextArea;
24 21 }
25 22
26 - public SizeableTextArea style( String pStyleName )
27 - {
23 + public SizeableTextArea style( String pStyleName ) {
28 24 addStyleName( pStyleName );
29 25 return this;
30 26 }
  @@ -35,20 +31,17 @@
35 31 *
36 32 * @return the requested width, in characters
37 33 */
38 - public int getCharacterWidth()
39 - {
34 + public int getCharacterWidth() {
40 35 return mTextArea.getCharacterWidth();
41 36 }
42 37
43 38 @Override
44 - public int getCursorPos()
45 - {
39 + public int getCursorPos() {
46 40 return mTextArea.getCursorPos();
47 41 }
48 42
49 43 @Override
50 - public int getSelectionLength()
51 - {
44 + public int getSelectionLength() {
52 45 return mTextArea.getSelectionLength();
53 46 }
54 47
  @@ -57,8 +50,7 @@
57 50 *
58 51 * @return the number of visible lines
59 52 */
60 - public int getVisibleLines()
61 - {
53 + public int getVisibleLines() {
62 54 return mTextArea.getVisibleLines();
63 55 }
64 56
  @@ -68,8 +60,7 @@
68 60 *
69 61 * @param width the requested width, in characters
70 62 */
71 - public void setCharacterWidth( int width )
72 - {
63 + public void setCharacterWidth( int width ) {
73 64 mTextArea.setCharacterWidth( width );
74 65 }
75 66
  @@ -78,19 +69,16 @@
78 69 *
79 70 * @param lines the number of visible lines
80 71 */
81 - public void setVisibleLines( int lines )
82 - {
72 + public void setVisibleLines( int lines ) {
83 73 mTextArea.setVisibleLines( lines );
84 74 }
85 75
86 - public boolean isReadOnly()
87 - {
76 + public boolean isReadOnly() {
88 77 String attribute = DOM.getElementProperty( getTextBoxBase().getElement(), "readonly" );
89 78 return (attribute != null);
90 79 }
91 80
92 - public void setReadOnly( boolean pReadOnly )
93 - {
81 + public void setReadOnly( boolean pReadOnly ) {
94 82 DOM.setElementProperty( getTextBoxBase().getElement(), "readonly", pReadOnly ? "readonly" : null );
95 83 }
96 84 }