JFormatted beans - overview

The JFormatted beans include a set of utility classes that extend the support of code to let you set iSeries fields and attributes like edit code, edit word, formatting, and verification capabilities for a Swing component.

JFormatted beans - Swing text framework

The following JFormatted beans are available.

Bean name Description
com.ibm.etools.iseries.ui.JFormattedComboBox Extension of Swing JComboBox component. Use this bean to implement the VALUES feature on the iSeries server.
com.ibm.etools.iseries.ui.JFormattedLabel Extension of Swing JLabel component
com.ibm.etools.iseries.ui.JFormattedTable Extension of Swing JTable component
com.ibm.etools.iseries.ui.JFormattedTextField Extension of Swing JTextField component
com.ibm.etools.iseries.ui.EditcodeEditwordFormatter Use this bean to format a string by specifying an iSeries edit code or edit word.

All attribute settings are defined using a field model. The AS400FieldModel class is the default field model that is used by the JFormatted beans. It sets the defaults for iSeries-specific attributes. For non-iSeries applications, you can use the DefaultFieldModel.

Note: When a JFormattedTable bean is populated by a Data file utility (DFU) bean, you can easily display, navigate through, and edit iSeries database data in the resulting table. However, the identifier of the table column of the JFormattedTable bean must match the field names of the database file that are defined in the DFU bean, so the DFU bean can map the data to the table. The field-to-column mapping is performed by the DFU bean. The other information about the columns is customizable.

A JFormattedComponent has a single model and a single delegate associated with it. You can define your own model and delegate for any Swing component. To implement the data model, a text-based component must implement the Document interface and define a user interface (UI) delegate. In a UI delegate, you can specify a view for the visual representation of the component.

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

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

Related tasks
Running iSeries Java bean examples
Related reference
Data file utility (DFU) beans
JFormatted beans - FieldModel
IBM-supplied iSeries Java beans
JFormattedComboBox bean
JFormattedComboBoxCellEditor bean
JFormattedLabel bean
JFormattedLabelCellRenderer bean
JFormattedTable bean
JFormattedTableColumn bean
JFormattedTextField bean
JFormattedTextFieldCellEditor bean
DefaultFieldModel
AS400FieldModel