Subversion Repository Public Repository

litesoft

Diff Revisions 949 vs 950 for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/widgets/TextAreaChangeListenable.java

Diff revisions: vs.
  @@ -1,50 +1,50 @@
1 - // This Source Code is in the Public Domain per: http://unlicense.org
2 - package org.litesoft.GWT.client.widgets;
3 -
4 - import org.litesoft.GWT.client.widgets.nonpublic.*;
5 -
6 - import com.google.gwt.user.client.*;
7 - import com.google.gwt.user.client.ui.*;
8 -
9 - public class TextAreaChangeListenable extends TextArea implements IFocusWidget {
10 - public TextAreaChangeListenable( int pInitialWidth, int pInitialLines, boolean pNoWrap ) {
11 - setCharacterWidth( pInitialWidth );
12 - setVisibleLines( pInitialLines );
13 - mHelper = new TextAreaSupport( this, pNoWrap );
14 - }
15 -
16 - public TextAreaChangeListenable( Integer pInitialWidth, Integer pInitialLines, boolean pNoWrap ) {
17 - this( (pInitialWidth != null) ? pInitialWidth.intValue() : 40, //
18 - (pInitialLines != null) ? pInitialLines.intValue() : 4, //
19 - pNoWrap );
20 - }
21 -
22 - TextBoxBaseChangeListenableHelper mHelper;
23 -
24 - @Override
25 - protected void onDetach() {
26 - super.onDetach();
27 - mHelper.onDetach();
28 - }
29 -
30 - @Override
31 - public void setEnabled( boolean enabled ) {
32 - DOM.setElementPropertyBoolean( getElement(), "readOnly", !enabled );
33 - }
34 -
35 - @Override
36 - public void setText( String text ) {
37 - super.setText( text );
38 - mHelper.setText( text );
39 - }
40 -
41 - @Override
42 - public void setCharacterWidth( int width ) {
43 - super.setCharacterWidth( width < 20 ? 20 : width );
44 - }
45 -
46 - @Override
47 - public void setVisibleLines( int lines ) {
48 - super.setVisibleLines( lines < 2 ? 2 : lines );
49 - }
50 - }
1 + // This Source Code is in the Public Domain per: http://unlicense.org
2 + package org.litesoft.GWT.client.widgets;
3 +
4 + import org.litesoft.GWT.client.widgets.nonpublic.*;
5 +
6 + import com.google.gwt.user.client.*;
7 + import com.google.gwt.user.client.ui.*;
8 +
9 + public class TextAreaChangeListenable extends TextArea implements IFocusWidget {
10 + public TextAreaChangeListenable( int pInitialWidth, int pInitialLines, boolean pNoWrap ) {
11 + setCharacterWidth( pInitialWidth );
12 + setVisibleLines( pInitialLines );
13 + mHelper = new TextAreaSupport( this, pNoWrap );
14 + }
15 +
16 + public TextAreaChangeListenable( Integer pInitialWidth, Integer pInitialLines, boolean pNoWrap ) {
17 + this( (pInitialWidth != null) ? pInitialWidth.intValue() : 40, //
18 + (pInitialLines != null) ? pInitialLines.intValue() : 4, //
19 + pNoWrap );
20 + }
21 +
22 + TextBoxBaseChangeListenableHelper mHelper;
23 +
24 + @Override
25 + protected void onDetach() {
26 + super.onDetach();
27 + mHelper.onDetach();
28 + }
29 +
30 + @Override
31 + public void setEnabled( boolean enabled ) {
32 + DOM.setElementPropertyBoolean( getElement(), "readOnly", !enabled );
33 + }
34 +
35 + @Override
36 + public void setText( String text ) {
37 + super.setText( text );
38 + mHelper.setText( text );
39 + }
40 +
41 + @Override
42 + public void setCharacterWidth( int width ) {
43 + super.setCharacterWidth( width < 20 ? 20 : width );
44 + }
45 +
46 + @Override
47 + public void setVisibleLines( int lines ) {
48 + super.setVisibleLines( lines < 2 ? 2 : lines );
49 + }
50 + }