Java javax.swing.text MaskFormatter fields, constructors, methods, implement or subclass

Example usage for Java javax.swing.text MaskFormatter fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for javax.swing.text MaskFormatter.

The text is from its open source code.

Subclass

javax.swing.text.MaskFormatter has subclasses.
Click this link to see all its subclasses.

Constructor

MaskFormatter(String mask)
Creates a MaskFormatter with the specified mask.
MaskFormatter()
Creates a MaskFormatter with no mask.

Method

StringgetMask()
Returns the formatting mask.
ClassgetValueClass()
Returns that class that is used to create new Objects.
voidinstall(JFormattedTextField ftf)
Installs the DefaultFormatter onto a particular JFormattedTextField.
voidsetAllowsInvalid(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).
voidsetMask(String mask)
Sets the mask dictating the legal characters.
voidsetOverwriteMode(boolean overwriteMode)
Configures the behavior when inserting characters.
voidsetPlaceholder(String placeholder)
Sets the string to use if the value does not completely fill in the mask.
voidsetPlaceholderCharacter(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.
voidsetValidCharacters(String validCharacters)
Allows for further restricting of the characters that can be input.
voidsetValueClass(Class valueClass)
Sets that class that is used to create new Objects.
voidsetValueContainsLiteralCharacters(boolean containsLiteralChars)
If true, the returned value and set value will also contain the literal characters in mask.
ObjectstringToValue(String value)
Parses the text, returning the appropriate Object representation of the String value.
StringvalueToString(Object value)
Returns a String representation of the Object value based on the mask.