JComponent
to generate a graphic representation and customize it using CSS.
TableCellRenderer
interface) to generate an arbitrary Swing Component.
'class'
. The given class must follow the JavaBeans™ pattern; its
properties can be directly customized in CSS.
object."Service/type" { class: 'ilog.views.sdm.graphic.IlvGeneralNode'; label: @name; labelPosition: Right; labelColor: black; labelSpacing: 4; shapeType: RECTANGLE; shapeWidth: 12; shapeHeight: 12; } object."Service/type":selected { labelColor: red; }
class
property, refer to Class property.
JComponent
instances can be used to represent table cells in the same way as
they are used to represent tree nodes (see How to use a JComponent to generate a tree
node representation).
JLabel
whose properties
text
,
icon
and
foreground
are customized according to the business attribute and the
selection state of the table cell.
object."Service/type" { class: 'javax.swing.JLabel'; icon : @=icon; text: @type; foreground: black; } object."Service/type":selected { foreground: red; } Subobject#icon { class: 'javax.swing.ImageIcon'; image: '@|image("service.png")'; }
JComponent
instances can be used to represent table cells through the
property
'class'
. The given class must follow the JavaBeans pattern; its
properties can be customized directly in CSS (icon, text,
foreground).
class
property, refer to Class property.
TableCellRenderer
interface. For details, refer to Using
an arbitrary TreeCellRenderer.