|
@@ -1,30 +1,30 @@ |
1 |
|
- |
// This Source Code is in the Public Domain per: http://unlicense.org |
2 |
|
- |
package org.litesoft.GWT.forms.client.components.factories.input; |
3 |
|
- |
|
4 |
|
- |
import org.litesoft.GWT.forms.client.components.factories.*; |
5 |
|
- |
import org.litesoft.GWT.forms.client.nonpublic.*; |
6 |
|
- |
import org.litesoft.ui.def.nonpublic.*; |
7 |
|
- |
import org.litesoft.ui.def.nonpublic.support.*; |
8 |
|
- |
|
9 |
|
- |
import com.google.gwt.user.client.ui.*; |
10 |
|
- |
|
11 |
|
- |
import java.io.*; |
12 |
|
- |
|
13 |
|
- |
public class UiDoubleWidgetFactory implements InputWidgetFactory { |
14 |
|
- |
public Widget create( FormInstanceComponentHandler pComponentHandler, // |
15 |
|
- |
UiInputDef pUiDef, AttributeMetaData pMetaData, |
16 |
|
- |
boolean pHasHorizontalPeer ) { |
17 |
|
- |
return new MyFormAdapter( pComponentHandler, pUiDef, (DoubleMetaData) pMetaData ).init(); |
18 |
|
- |
} |
19 |
|
- |
|
20 |
|
- |
private static final class MyFormAdapter extends AbstractNumericRequireableAttributeAdapter { |
21 |
|
- |
public MyFormAdapter( FormInstanceComponentHandler pComponentHandler, UiInputDef pUiDef, |
22 |
|
- |
DoubleMetaData pMD ) { |
23 |
|
- |
super( pComponentHandler, pUiDef, pMD ); |
24 |
|
- |
} |
25 |
|
- |
|
26 |
|
- |
protected Serializable LLconvertNonNullComponentValueToSendable( String pCleanedValue ) { |
27 |
|
- |
return Double.valueOf( pCleanedValue ); |
28 |
|
- |
} |
29 |
|
- |
} |
30 |
|
- |
} |
|
1 |
+ |
// This Source Code is in the Public Domain per: http://unlicense.org |
|
2 |
+ |
package org.litesoft.GWT.forms.client.components.factories.input; |
|
3 |
+ |
|
|
4 |
+ |
import org.litesoft.GWT.forms.client.components.factories.*; |
|
5 |
+ |
import org.litesoft.GWT.forms.client.nonpublic.*; |
|
6 |
+ |
import org.litesoft.ui.def.nonpublic.*; |
|
7 |
+ |
import org.litesoft.ui.def.nonpublic.support.*; |
|
8 |
+ |
|
|
9 |
+ |
import com.google.gwt.user.client.ui.*; |
|
10 |
+ |
|
|
11 |
+ |
import java.io.*; |
|
12 |
+ |
|
|
13 |
+ |
public class UiDoubleWidgetFactory implements InputWidgetFactory { |
|
14 |
+ |
public Widget create( FormInstanceComponentHandler pComponentHandler, // |
|
15 |
+ |
UiInputDef pUiDef, AttributeMetaData pMetaData, |
|
16 |
+ |
boolean pHasHorizontalPeer ) { |
|
17 |
+ |
return new MyFormAdapter( pComponentHandler, pUiDef, (DoubleMetaData) pMetaData ).init(); |
|
18 |
+ |
} |
|
19 |
+ |
|
|
20 |
+ |
private static final class MyFormAdapter extends AbstractNumericRequireableAttributeAdapter { |
|
21 |
+ |
public MyFormAdapter( FormInstanceComponentHandler pComponentHandler, UiInputDef pUiDef, |
|
22 |
+ |
DoubleMetaData pMD ) { |
|
23 |
+ |
super( pComponentHandler, pUiDef, pMD ); |
|
24 |
+ |
} |
|
25 |
+ |
|
|
26 |
+ |
protected Serializable LLconvertNonNullComponentValueToSendable( String pCleanedValue ) { |
|
27 |
+ |
return Double.valueOf( pCleanedValue ); |
|
28 |
+ |
} |
|
29 |
+ |
} |
|
30 |
+ |
} |