| Package | Description |
|---|---|
| javax.swing |
Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms.
|
| javax.swing.text |
Provides classes and interfaces that deal with editable and noneditable text components.
|
| Modifier and Type | Method and Description |
|---|---|
JFormattedTextField |
JFormattedTextField.getFormatter()
Returns the
AbstractFormatter that is used to format and parse the current value.
|
abstract JFormattedTextField |
JFormattedTextField.AbstractFormatterFactory.getFormatter(JFormattedTextField
Returns an
AbstractFormatter that can handle formatting of the passed in
JFormattedTextField.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
JFormattedTextField.setFormatter(JFormattedTextField
Sets the current
AbstractFormatter.
|
| Constructor and Description | |
|---|---|
JFormattedTextField(JFormattedTextField
Creates a
JFormattedTextField with the specified
AbstractFormatter.
|
| Modifier and Type | Class and Description |
|---|---|
class |
DateFormatter
DateFormatter is an
InternationalFormatter that does its formatting by way of an instance of
java.text.DateFormat.
|
class |
DefaultFormatter
DefaultFormatter formats arbitrary objects.
|
class |
InternationalFormatter
InternationalFormatter extends
DefaultFormatter, using an instance of
java.text.Format to handle the conversion to a String, and the conversion from a String.
|
class |
MaskFormatter
MaskFormatter is used to format and edit strings.
|
class |
NumberFormatter
NumberFormatter subclasses
InternationalFormatter adding special behavior for numbers.
|
| Modifier and Type | Method and Description |
|---|---|
JFormattedTextField |
DefaultFormatterFactory.getDefaultFormatter()
Returns the
JFormattedTextField.AbstractFormatter to use as a last resort, eg in case a display, edit or null
JFormattedTextField.AbstractFormatter has not been specified.
|
JFormattedTextField |
DefaultFormatterFactory.getDisplayFormatter()
Returns the
JFormattedTextField.AbstractFormatter to use if the
JFormattedTextField is not being edited and either the value is not-null, or the value is null and a null formatter has has not been specified.
|
JFormattedTextField |
DefaultFormatterFactory.getEditFormatter()
Returns the
JFormattedTextField.AbstractFormatter to use if the
JFormattedTextField is being edited and either the value is not-null, or the value is null and a null formatter has has not been specified.
|
JFormattedTextField |
DefaultFormatterFactory.getFormatter(JFormattedTextField
Returns either the default formatter, display formatter, editor formatter or null formatter based on the state of the JFormattedTextField.
|
JFormattedTextField |
DefaultFormatterFactory.getNullFormatter()
Returns the formatter to use if the value is null.
|
| Modifier and Type | Method and Description |
|---|---|
void |
DefaultFormatterFactory.setDefaultFormatter(JFormattedTextField
Sets the
JFormattedTextField.AbstractFormatter to use as a last resort, eg in case a display, edit or null
JFormattedTextField.AbstractFormatter has not been specified.
|
void |
DefaultFormatterFactory.setDisplayFormatter(JFormattedTextField
Sets the
JFormattedTextField.AbstractFormatter to use if the
JFormattedTextField is not being edited and either the value is not-null, or the value is null and a null formatter has has not been specified.
|
void |
DefaultFormatterFactory.setEditFormatter(JFormattedTextField
Sets the
JFormattedTextField.AbstractFormatter to use if the
JFormattedTextField is being edited and either the value is not-null, or the value is null and a null formatter has has not been specified.
|
void |
DefaultFormatterFactory.setNullFormatter(JFormattedTextField
Sets the formatter to use if the value of the JFormattedTextField is null.
|
| Constructor and Description | |
|---|---|
DefaultFormatterFactory(JFormattedTextField
Creates a
DefaultFormatterFactory with the specified
JFormattedTextField.AbstractFormatter.
|
|
DefaultFormatterFactory(JFormattedTextField
Creates a
DefaultFormatterFactory with the specified
JFormattedTextField.AbstractFormatters.
|
|
DefaultFormatterFactory(JFormattedTextField
Creates a DefaultFormatterFactory with the specified JFormattedTextField.AbstractFormatters.
|
|
DefaultFormatterFactory(JFormattedTextField
Creates a DefaultFormatterFactory with the specified JFormattedTextField.AbstractFormatters.
|