01: /*
02: * Created on Mar 21, 2005
03: *
04: */
05: package org.swingml.component;
06:
07: import org.swingml.*;
08: import org.swingml.formatter.*;
09:
10: /**
11: * @author ybxdde
12: *
13: */
14: public class AbstractFormatterComponent {
15:
16: public static ISwingMLFormatter getFormatterByName(String formatter) {
17: ISwingMLFormatter abFormatter = null;
18: if (formatter.equalsIgnoreCase(Constants.MASKFORMATTER)) {
19: abFormatter = new SwingMLMaskFormatter();
20: } else if (formatter
21: .equalsIgnoreCase(Constants.NUMBERFORMATTER)) {
22: abFormatter = new SwingMLNumberFormatter();
23: } else if (formatter.equalsIgnoreCase(Constants.DATEFORMATTER)) {
24: abFormatter = new SwingMLDateFormatter();
25: }
26:
27: return abFormatter;
28: }
29:
30: }
|