Subversion Repository Public Repository

litesoft

Diff Revisions 949 vs 950 for /trunk/GWT_Sandbox/FormEngine/src/com/temp/client/foundation/widget/input/support/TextBoxBaseValueAdapter.java

Diff revisions: vs.
  @@ -1,30 +1,30 @@
1 - package com.temp.client.foundation.widget.input.support;
2 -
3 - import com.google.gwt.event.dom.client.*;
4 - import com.google.gwt.event.shared.*;
5 - import com.temp.client.foundation.widget.input.fieldsupport.*;
6 - import com.temp.shared.utils.*;
7 -
8 - public class TextBoxBaseValueAdapter implements InputWidgetValueAdapter<String> {
9 -
10 - private final ActiveTextBoxBase inputWidget;
11 -
12 - public TextBoxBaseValueAdapter( ActiveTextBoxBase inputWidget ) {
13 - Validate.notNull( "inputWidget", this.inputWidget = inputWidget );
14 - }
15 -
16 - @Override
17 - public HandlerRegistration addChangeHandler( ChangeHandler handler ) {
18 - return inputWidget.addChangeHandler( handler );
19 - }
20 -
21 - @Override
22 - public String getValue() {
23 - return StringUtils.deNull( inputWidget.getText() ).trim();
24 - }
25 -
26 - @Override
27 - public void setValue( String value ) {
28 - inputWidget.setText( StringUtils.deNull( value ).trim() );
29 - }
30 - }
1 + package com.temp.client.foundation.widget.input.support;
2 +
3 + import com.google.gwt.event.dom.client.*;
4 + import com.google.gwt.event.shared.*;
5 + import com.temp.client.foundation.widget.input.fieldsupport.*;
6 + import com.temp.shared.utils.*;
7 +
8 + public class TextBoxBaseValueAdapter implements InputWidgetValueAdapter<String> {
9 +
10 + private final ActiveTextBoxBase inputWidget;
11 +
12 + public TextBoxBaseValueAdapter( ActiveTextBoxBase inputWidget ) {
13 + Validate.notNull( "inputWidget", this.inputWidget = inputWidget );
14 + }
15 +
16 + @Override
17 + public HandlerRegistration addChangeHandler( ChangeHandler handler ) {
18 + return inputWidget.addChangeHandler( handler );
19 + }
20 +
21 + @Override
22 + public String getValue() {
23 + return StringUtils.deNull( inputWidget.getText() ).trim();
24 + }
25 +
26 + @Override
27 + public void setValue( String value ) {
28 + inputWidget.setText( StringUtils.deNull( value ).trim() );
29 + }
30 + }