| Graphic Components > Table Component > Architecture of the Table Component |
Architecture of the Table Component |
INDEX
PREVIOUS
NEXT
|
Like the other JViews TGO components, the table component is based on the MVC architecture, which means that it has a model, a view and a controller associated with it. For a general introduction to the MVC architecture, see section Architecture of Graphic Components.
This section describes the classes and features of the table component specific to each of the three modules of the MVC architecture, and also explains the role of the adapter. It contains the following topics:
This section describes the classes that you can use to create and manage tables. For a more detailed description, refer to the ILOG JViews TGO Java API Reference Documentation. The classes are organized as follows:
The MVC architecture for the table component is implemented by the following classes (see Figure 5.2):
IlpTableView class is the view module of the MVC architecture. It defines a Swing-based table used to display representation objects. It uses an IlpTableModel as entry model.
IlpTableModel interface defines how the IlpTableView can access representation objects and attributes. Implementations of this interface relate to the model module of the MVC architecture.
IlpTableColumnModel class defines which columns of the table model are visible, which are fixed, as well as the order and the size of the columns.
IlpTableController class represents the controller module of the MVC architecture. This class is used to define the behavior of the IlpTableView. Its API contains methods to sort the table columns and to set interactors to the table.
IlpTable is a convenient Bean that replicates the key API of the MVC components and can also be used inside an IDE. It creates an IlpTableView, an IlpTableListModel, and an IlpTableController and interconnects these objects.
For general information about the model, the view, and the controller, see section Architecture of Graphic Components.
The representation model for the table component is implemented by the following classes (see Figure 5.3):
IlpTableRow interface defines the representation objects that can be displayed in the IlpTableView.
IlpDefaultTableRow class is the default implementation of IlpTableRow. It can use the attribute values of the representation object directly or take the attribute values of the corresponding business object.
IlpAbstractTableModel is an abstract implementation of the IlpTableModel interface. It provides attributes to the IlpTableView based on an IlpExtendedAttributeGroup. It defines an arbitrary order of the attributes, which corresponds to the default order of the columns in the table.
IlpDefaultListModel class is provided to contain representation objects (IlpTableRow instances) stored as a list.
IlpTableListModel class extends IlpAbstractTableModel. It is designed to provide representation objects to the IlpTableView. The representation objects are stored as a list based on an IlpDefaultListModel. The IlpDefaultListModel can be connected to a back-end application by means of an adapter and a data source or be fed directly with representation objects.
For general information about the representation model and the representation objects, see section Architecture of Graphic Components.
The graphic view and the renderers are implemented by the following classes (see Figure 5.4):
IlpTableHeaderRenderer is used to render the column headers of the table (view). In each column header, it displays an icon, indicating the sorting direction and sorting order of the columns, and uses the style sheet information set to the table to get the column label and description.
IlpTableCellRenderer is used to render the cells of the table. It uses the style sheet information set to the table to retrieve the graphic characteristics needed to display the cell contents, such as label, icon, font, or color.
IlpCellCoordinates locates a cell in an IlpTableView. It is defined by a row index and a column index.
For general information about the graphic view and the rendering, see section Architecture of Graphic Components.
The controller and interactors of the table component are implemented by the following classes:
IlpTableController, an IlpDefaultTableViewInteractor object assigns default behavior to the table view, delegating events that occur in the table to an IlpDefaultTableHeaderInteractor or to an IlpObjectInteractor, according to the location of the events.
IlpDefaultTableMenuFactory provides a default pop-up menu to be displayed on a table header.
For general information about the controller and interactors, see section Architecture of Graphic Components.
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. All rights reserved. Legal terms. | PREVIOUS NEXT |