DefaultFieldModel

The DefaultFieldModel sets the default field model properties without setting any iSeries specific default properties, as follows:

dataAttributes
Instance of DataAttributes with:
  • autoAdvance: false
  • dataLength: 10
  • dataType: character
  • decimalPlaces: 0
  • decimalSymbol: .
  • reverseImageColor: java.awt.Color.red
formatter
Instance of DefaultFormatter, which always returns the input string without any formatting.
keystroke verifier
Instance of PlainDocument with:
  • documentProperties: {tabSize=8}
validator
Instance of DefaultValidator, which always returns true for validation. Since a JFormattedComponent verifies the data type, data length, and decimal places, the field might still be invalid.
Note:

Although the dataAttributes default to a length of 10 with a character data type, since the keystrokeVerifier is set to PlainDocument, which is the default document model set in JTextField, there is no keystroke validation. However a JFormattedComponent, such as a JFormattedTextField, JFormattedComboBox or JFormattedLabel, verifies the data type, the length, and decimal places of the field even when DefaultFieldModel is used.

For more information about Swing architecture, see the following Web site:

http://java.sun.com/products/jfc/tsc/articles/architecture/index.html

Related reference
JFormatted beans
JFormatted beans - FieldModel
JFormattedTextField bean
JFormattedLabel bean
JFormattedComboBox bean JFormattedTable bean JFormattedTableColumn bean
AS400FieldModel
Related information
DefaultFieldModel