The view

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.

Using your own graphic representation

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:
  1. Implement your own graphic object or use an existing one, either as an IlvGraphic or as a JComponent .
  2. Configure the properties of the objects or classes you want to represent with this property using CSS.
  3. Load this CSS file in the table component as illustrated in How to load a CSS file in a table component.

Using an arbitrary TableCellRenderer

The renderer used by an IlpTableView is an IlpTableCellRenderer. You can replace it with you own renderer, using the setDefaultRenderer method. This renderer must implement the TableCellRenderer interface.
To write your own renderer, do the following:
  1. Implement the javax.swing.table.TableCellRenderer interface.
  2. Configure your table component to use your renderer.
    The following code extract shows how to configure an IlpTableView to use the MyTableCellRenderer class to render all table cells:
    IlpTableView view = //access the table view
    view.setDefaultRenderer(new MyTableCellRenderer());