FieldModel is an interface for a field model. A field model holds information about a data field.
A field model has the following properties.
com.ibm.etools.iseries.ui.DataAttributes -- A class that defines the attributes of a field such as autoAdvance, data type, data length, size of decimal places, decimal point symbol, and reverse image color. These attributes are required by the Formatter, KeystrokeVerifier and Validator. These are the default properties:
com.ibm.etools.iseries.ui.Formatter -- An interface where you can specify a class to define how text is formatted in a JFormatted bean. You can define your own formatter class or use the default formatter class, which is com.ibm.etools.iseries.ui.EditcodeEditwordFormatter. You can set edit code or edit word format for the text of a field. The formatter class that you create using this interface must implement the method String formatString(String text).
com.ibm.etools.iseries.ui.KeystrokeVerifier -- An interface where you can specify a document class to control the data model of a JFormatted bean, using DataAttributes and EditmaskAttributes to define a data model. The purpose of a document class is to restrict the content of the data. Two predefined document classes are shipped with the JFormatted beans: NumericCharacterDocument and UppercaseDocument. You can use any of these document classes or you can define your own.
com.ibm.etools.iseries.ui.Validator -- An interface where you can specify a class to define data validity checks. You can define your own validator or use the default validator class, which is com.ibm.etools.iseries.ui.ComparisonRangeValidator. Use this attribute to set comparison or range validity checking on the text of a field. The class that you create using this interface must implement the method boolean isDataValid(String text).
For more information about Swing architecture, see the following Web site:
http://java.sun.com/products/jfc/tsc/articles/architecture/index.html
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.