01: package org.swingml.formatter;
02:
03: /**
04: * @author CrossLogic
05: */
06: public interface ISwingMLFormatter {
07:
08: /**
09: * Returns the string representing what the JFormattedTextFieldComponent's value will look like if it is empty.
10: * For example: A mask of ###-###-#### will be represented by " - - " when empty.
11: *
12: * @return
13: */
14: public String getNullPattern();
15:
16: /**
17: * If this Formatter should allow empty values, return true. Else, return false.
18: *
19: * @return
20: */
21: public boolean isNullable();
22:
23: /**
24: * Set whether this formatter shold allow empty values or not.
25: *
26: * @param canBeNull
27: */
28: public void setNullable(boolean canBeNull);
29:
30: /**
31: * Set the pattern to match to in order to determine if the value is empty. See getNullPattern() for more details.
32:
33: * @param pattern
34: */
35: public void setNullPattern(String pattern);
36:
37: }
|