public DataField(AbstractFormatter formatter) {
// TF:17/4/08:Changed this method so we could override the formatter if needed
super();
if (formatter.getClass().equals(MaskFormatter.class)) {
MaskFormatter mf = (MaskFormatter)formatter;
try {
NonMandatoryMaskFormatter newFormatter = new NonMandatoryMaskFormatter(mf.getMask());
newFormatter.setPlaceholderCharacter(mf.getPlaceholderCharacter());
newFormatter.setValueContainsLiteralCharacters(mf.getValueContainsLiteralCharacters());
newFormatter.setAllowsInvalid(mf.getAllowsInvalid());
newFormatter.setValidCharacters(mf.getValidCharacters()); // CraigM:07/01/2009.
formatter = newFormatter;
}
catch (ParseException e) {
// Not much we can do here, shouldn't happen anyway. Just ignore it and leave the original formatter
}