Example usage for Java javax.swing.text MaskFormatter fields, constructors, methods, implement or subclass
The text is from its open source code.
MaskFormatter(String mask) Creates a MaskFormatter with the specified mask. | |
MaskFormatter() Creates a MaskFormatter with no mask. |
String | getMask() Returns the formatting mask. |
Class> | getValueClass() Returns that class that is used to create new Objects. |
void | install(JFormattedTextField ftf) Installs the DefaultFormatter onto a particular JFormattedTextField . |
void | setAllowsInvalid(boolean allowsInvalid) Sets whether or not the value being edited is allowed to be invalid for a length of time (that is, stringToValue throws a ParseException ). |
void | setMask(String mask) Sets the mask dictating the legal characters. |
void | setOverwriteMode(boolean overwriteMode) Configures the behavior when inserting characters. |
void | setPlaceholder(String placeholder) Sets the string to use if the value does not completely fill in the mask. |
void | setPlaceholderCharacter(char placeholder) Sets the character to use in place of characters that are not present in the value, ie the user must fill them in. |
void | setValidCharacters(String validCharacters) Allows for further restricting of the characters that can be input. |
void | setValueClass(Class> valueClass) Sets that class that is used to create new Objects. |
void | setValueContainsLiteralCharacters(boolean containsLiteralChars) If true, the returned value and set value will also contain the literal characters in mask. |
Object | stringToValue(String value) Parses the text, returning the appropriate Object representation of the String value . |
String | valueToString(Object value) Returns a String representation of the Object value based on the mask. |