| Graphic Components > Table Component > Architecture of the Table Component > The View |
The View |
INDEX
PREVIOUS
NEXT
|
The table view is responsible for displaying the graphic objects (table cells) and as such corresponds to the visible part of the architecture.
You can customize the representation of table cells by:
These ways are provided in addition to the CSS-based customization of the default table cell renderer as explained in Customizing Table Cells in the Styling documentation.
You can create an IlvGraphic or a JComponent directly by declaring the class property and setting it in a CSS file.
The class property name is a reserved keyword that indicates the class name of the generated graphic object. JViews TGO provides a predefined representation for the objects in all graphic components, which means that the class property is optional. It can be used when you want to replace the predefined representation.
object."ilog.tgo.model.IltNetworkElement/label" {
class: ilog.views.sdm.graphic.IlvGeneralNode;
foreground: red;
label: @label;
}
IlpTableCellRenderer takes the information present in the CSS files to define how a table cell is rendered. If the property class is specified, it defines the IlvGraphic or JComponent that will be used to render the table cell.
To use a cascading style sheet class property in a table view, do the following:
IlvGraphic or as a JComponent.
The renderer used by an IlpTableView is an IlpTableCellRenderer. You can replace it with you own renderer, using the IlpTableView.setDefaultRenderer() method. This renderer must implement the TableCellRenderer interface.
To write your own renderer, do the following:
javax.swing.table.TableCellRenderer interface.
IlpTableView to use the MyTableCellRenderer class to render all table cells:
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. All rights reserved. Legal terms. | PREVIOUS NEXT |