JFormatted beans - overview

The JFormatted beans include a set of utility classes that extend the support of code to let you set IBM® i 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 IBM i 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 IBM i 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 IBM i-specific attributes. For non-IBM i 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 IBM i 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


Feedback