|
@@ -1,38 +1,38 @@ |
1 |
|
- |
// This Source Code is in the Public Domain per: http://unlicense.org |
2 |
|
- |
package org.litesoft.GWT.forms.server.support.mdconstruction; |
3 |
|
- |
|
4 |
|
- |
import org.litesoft.GWT.forms.server.support.*; |
5 |
|
- |
import org.litesoft.GWT.forms.server.support.converters.*; |
6 |
|
- |
import org.litesoft.GWT.forms.server.support.nonpublic.*; |
7 |
|
- |
import org.litesoft.configuration.*; |
8 |
|
- |
import org.litesoft.core.simpletypes.*; |
9 |
|
- |
import org.litesoft.ui.def.nonpublic.support.*; |
10 |
|
- |
|
11 |
|
- |
public class FormAMDFactory_Long extends AbstractNumericFormAMDFactory { |
12 |
|
- |
public static final FormAttributeMetaDataFactory SHORT = |
13 |
|
- |
new FormAMDFactory_Long( CreateAMDParamsPlus.DEFAULT_SHORT_DISPLAY_CHARS_WIDTH ); |
14 |
|
- |
|
15 |
|
- |
public static final FormAttributeMetaDataFactory INTEGER = |
16 |
|
- |
new FormAMDFactory_Long( CreateAMDParamsPlus.DEFAULT_INTEGER_DISPLAY_CHARS_WIDTH ); |
17 |
|
- |
|
18 |
|
- |
public static final FormAttributeMetaDataFactory LONG = |
19 |
|
- |
new FormAMDFactory_Long( CreateAMDParamsPlus.DEFAULT_LONG_DISPLAY_CHARS_WIDTH ); |
20 |
|
- |
|
21 |
|
- |
public FormAMDFactory_Long( Configuration.CachedConfigInt pDefaultWidth ) { |
22 |
|
- |
super( pDefaultWidth ); |
23 |
|
- |
} |
24 |
|
- |
|
25 |
|
- |
public AMDconverterPair createAttributeMetaData( CreateAMDParamsPlus pParams ) { |
26 |
|
- |
NumericFormatControl formatControl = getNumericFormatControl( pParams ); |
27 |
|
- |
return new AMDconverterPair( SendableLongConverter.INSTANCE, |
28 |
|
- |
new LongMetaData( pParams.getUsage(), pParams.isDisabled(), // |
29 |
|
- |
pParams.getHints(), // |
30 |
|
- |
pParams.getFieldLabel(), // |
31 |
|
- |
pParams.getFieldTooltip(), // |
32 |
|
- |
pParams.isRequired(), // |
33 |
|
- |
pParams.getErrorTextForRequired(), // |
34 |
|
- |
pParams.getMaxChars(), // |
35 |
|
- |
getDisplayCharsWidth( pParams ), // |
36 |
|
- |
formatControl ) ); |
37 |
|
- |
} |
38 |
|
- |
} |
|
1 |
+ |
// This Source Code is in the Public Domain per: http://unlicense.org |
|
2 |
+ |
package org.litesoft.GWT.forms.server.support.mdconstruction; |
|
3 |
+ |
|
|
4 |
+ |
import org.litesoft.GWT.forms.server.support.*; |
|
5 |
+ |
import org.litesoft.GWT.forms.server.support.converters.*; |
|
6 |
+ |
import org.litesoft.GWT.forms.server.support.nonpublic.*; |
|
7 |
+ |
import org.litesoft.configuration.*; |
|
8 |
+ |
import org.litesoft.core.simpletypes.*; |
|
9 |
+ |
import org.litesoft.ui.def.nonpublic.support.*; |
|
10 |
+ |
|
|
11 |
+ |
public class FormAMDFactory_Long extends AbstractNumericFormAMDFactory { |
|
12 |
+ |
public static final FormAttributeMetaDataFactory SHORT = |
|
13 |
+ |
new FormAMDFactory_Long( CreateAMDParamsPlus.DEFAULT_SHORT_DISPLAY_CHARS_WIDTH ); |
|
14 |
+ |
|
|
15 |
+ |
public static final FormAttributeMetaDataFactory INTEGER = |
|
16 |
+ |
new FormAMDFactory_Long( CreateAMDParamsPlus.DEFAULT_INTEGER_DISPLAY_CHARS_WIDTH ); |
|
17 |
+ |
|
|
18 |
+ |
public static final FormAttributeMetaDataFactory LONG = |
|
19 |
+ |
new FormAMDFactory_Long( CreateAMDParamsPlus.DEFAULT_LONG_DISPLAY_CHARS_WIDTH ); |
|
20 |
+ |
|
|
21 |
+ |
public FormAMDFactory_Long( Configuration.CachedConfigInt pDefaultWidth ) { |
|
22 |
+ |
super( pDefaultWidth ); |
|
23 |
+ |
} |
|
24 |
+ |
|
|
25 |
+ |
public AMDconverterPair createAttributeMetaData( CreateAMDParamsPlus pParams ) { |
|
26 |
+ |
NumericFormatControl formatControl = getNumericFormatControl( pParams ); |
|
27 |
+ |
return new AMDconverterPair( SendableLongConverter.INSTANCE, |
|
28 |
+ |
new LongMetaData( pParams.getUsage(), pParams.isDisabled(), // |
|
29 |
+ |
pParams.getHints(), // |
|
30 |
+ |
pParams.getFieldLabel(), // |
|
31 |
+ |
pParams.getFieldTooltip(), // |
|
32 |
+ |
pParams.isRequired(), // |
|
33 |
+ |
pParams.getErrorTextForRequired(), // |
|
34 |
+ |
pParams.getMaxChars(), // |
|
35 |
+ |
getDisplayCharsWidth( pParams ), // |
|
36 |
+ |
formatControl ) ); |
|
37 |
+ |
} |
|
38 |
+ |
} |