01: package org.jreform;
02:
03: import java.util.Date;
04:
05: import org.jreform.internal.BaseHtmlForm;
06: import org.jreform.types.BooleanType;
07: import org.jreform.types.CharType;
08: import org.jreform.types.DateType;
09: import org.jreform.types.DoubleType;
10: import org.jreform.types.FloatType;
11: import org.jreform.types.IntType;
12: import org.jreform.types.LongType;
13: import org.jreform.types.ShortType;
14: import org.jreform.types.StringType;
15:
16: /**
17: * This is a base class that should be extended to create a form.
18: *
19: * @author armandino (at) gmail.com
20: */
21: public class HtmlForm extends BaseHtmlForm {
22: // --------------------------------------------------------------------
23: // ---------------- Types supported out-of-the-box---------------------
24: // --------------------------------------------------------------------
25:
26: public static InputDataType<Boolean> booleanType() {
27: return BooleanType.booleanType();
28: }
29:
30: public static InputDataType<Character> charType() {
31: return CharType.charType();
32: }
33:
34: public static InputDataType<Short> shortType() {
35: return ShortType.shortType();
36: }
37:
38: public static InputDataType<Integer> intType() {
39: return IntType.intType();
40: }
41:
42: public static InputDataType<Long> longType() {
43: return LongType.longType();
44: }
45:
46: public static InputDataType<Double> doubleType() {
47: return DoubleType.doubleType();
48: }
49:
50: public static InputDataType<Float> floatType() {
51: return FloatType.floatType();
52: }
53:
54: public static InputDataType<String> stringType() {
55: return StringType.stringType();
56: }
57:
58: public static InputDataType<Date> dateType(String dateFormatPattern) {
59: return DateType.dateType(dateFormatPattern);
60: }
61:
62: }
|