litesoft
Diff Revisions
948
vs
950
for /trunk/GWT_Sandbox/FormEngine/src/com/temp/client/foundation/widget/input/support/OptionBoxBaseValueAdapter.java
|
@@ -1,31 +1,31 @@ |
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.*; |
6 |
|
- |
import com.temp.client.foundation.widget.input.fieldsupport.*; |
7 |
|
- |
import com.temp.shared.utils.*; |
8 |
|
- |
|
9 |
|
- |
public class OptionBoxBaseValueAdapter<T> implements InputWidgetValueAdapter<T> { |
10 |
|
- |
|
11 |
|
- |
private final OptionBox<T> inputWidget; |
12 |
|
- |
|
13 |
|
- |
public OptionBoxBaseValueAdapter( OptionBox<T> inputWidget ) { |
14 |
|
- |
Validate.notNull( "inputWidget", this.inputWidget = inputWidget ); |
15 |
|
- |
} |
16 |
|
- |
|
17 |
|
- |
@Override |
18 |
|
- |
public HandlerRegistration addChangeHandler( ChangeHandler handler ) { |
19 |
|
- |
return inputWidget.addChangeHandler( handler ); |
20 |
|
- |
} |
21 |
|
- |
|
22 |
|
- |
@Override |
23 |
|
- |
public T getValue() { |
24 |
|
- |
return inputWidget.getSelected(); |
25 |
|
- |
} |
26 |
|
- |
|
27 |
|
- |
@Override |
28 |
|
- |
public void setValue( T value ) { |
29 |
|
- |
inputWidget.setSelected( value ); |
30 |
|
- |
} |
31 |
|
- |
} |
|
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.*; |
|
6 |
+ |
import com.temp.client.foundation.widget.input.fieldsupport.*; |
|
7 |
+ |
import com.temp.shared.utils.*; |
|
8 |
+ |
|
|
9 |
+ |
public class OptionBoxBaseValueAdapter<T> implements InputWidgetValueAdapter<T> { |
|
10 |
+ |
|
|
11 |
+ |
private final OptionBox<T> inputWidget; |
|
12 |
+ |
|
|
13 |
+ |
public OptionBoxBaseValueAdapter( OptionBox<T> inputWidget ) { |
|
14 |
+ |
Validate.notNull( "inputWidget", this.inputWidget = inputWidget ); |
|
15 |
+ |
} |
|
16 |
+ |
|
|
17 |
+ |
@Override |
|
18 |
+ |
public HandlerRegistration addChangeHandler( ChangeHandler handler ) { |
|
19 |
+ |
return inputWidget.addChangeHandler( handler ); |
|
20 |
+ |
} |
|
21 |
+ |
|
|
22 |
+ |
@Override |
|
23 |
+ |
public T getValue() { |
|
24 |
+ |
return inputWidget.getSelected(); |
|
25 |
+ |
} |
|
26 |
+ |
|
|
27 |
+ |
@Override |
|
28 |
+ |
public void setValue( T value ) { |
|
29 |
+ |
inputWidget.setSelected( value ); |
|
30 |
+ |
} |
|
31 |
+ |
} |