JFormattedTextField

Extends
JTextField
Methods
7
Fields
7

Getting one

JFormattedTextField.new()

Methods

MethodReturnsDescription
getFormatter()anyThe formatter its factory gives it now.
getFormatterFactory()anyIts formatter factory.
setFormatterFactory(any)()Sets the factory; its formatter shows the value.
setValue(any)()The value, shown through the formatter (a factory for its type is made when the field has none).
new()JFormattedTextFieldAn empty formatted field (no value, no formatter until setValue or setFormatterFactory).
init(JFormattedTextField)()An empty formatted field (no value, no formatter until setValue or setFormatterFactory).
isInstance(any)booleanWhether obj is a JFormattedTextField object, a class(JFormattedTextField) subclass's included.

Fields

FieldTypeDescription
COMMITnumberJFormattedTextField.COMMIT: a focus loss commits a valid edit and keeps an invalid one (0).
COMMIT_OR_REVERTnumberJFormattedTextField.COMMIT_OR_REVERT: a focus loss commits a valid edit and reverts an invalid one (1, the default).
REVERTnumberJFormattedTextField.REVERT: a focus loss reverts the edit (2).
PERSISTnumberJFormattedTextField.PERSIST: a focus loss keeps the edit as it is (3).
AbstractFormatterJFormattedTextFieldAbstractFormatterClassJFormattedTextField.AbstractFormatter: the nested class's table (the Swing prelude's).
AbstractFormatterFactoryJFormattedTextFieldAbstractFormatterFactoryClassJFormattedTextField.AbstractFormatterFactory: the nested class's table (the Swing prelude's).
superJTextFieldClassJTextField's class table: the base class.

Returned by

MethodReturnsDescription
JFormattedTextFieldClass.newJFormattedTextFieldAn empty formatted field (no value, no formatter until setValue or setFormatterFactory).

Method details

setValue

setValue: (JFormattedTextField, any) -> ()

The value, shown through the formatter (a factory for its type is made when the field has none).

new

new: () -> JFormattedTextField

An empty formatted field (no value, no formatter until setValue or setFormatterFactory).

init

init: (JFormattedTextField) -> ()

An empty formatted field (no value, no formatter until setValue or setFormatterFactory).

isInstance

isInstance: (any) -> boolean

Whether obj is a JFormattedTextField object, a class(JFormattedTextField) subclass's included.