| Styling > Using Cascading Style Sheets > Customizing Network and Equipment Nodes > User-Defined Business Objects |
User-Defined Business Objects |
INDEX
PREVIOUS
NEXT
|
To customize the default graphic representation of user-defined business objects in the network and equipment, refer to Customizing User-Defined Business Objects.
To further customize the network and equipment node rendering, you may also:
IlvGraphic to generate an arbitrarily complex graphic representation (IlvCompositeGraphic). For more information about composite graphics, see Graphic Objects.
JComponent to generate a graphic representation and customize it using CSS.
IlvGraphic instances can be used to represent network and equipment nodes through the property 'class'. The given class must follow the JavaBeans pattern; its properties can be directly customized in CSS.
The sample located in
<installdir>/samples/network/compositeGraphic/,
where <installdir> is the directory where you have installed JViews TGO, illustrates how to use an IlvGraphic to generate a network node representation. This sample shows how to create a complex graphic representation using composite graphics that are fully customizable through CSS.
For information about how to use JavaBeans in CSS and how to use the class property, refer to Class Property.
In the following example, a JComponent is used to generate the network node representation of a user-defined class named Workstation. Business objects of this class are represented in the network component as a JButton with the given label and icon.
object."Workstation" {
class: 'javax.swing.JButton;
icon : @=icon;
label: @name;
foreground: black;
}
object."Workstation":selected {
foreground: red;
}
Subobject#icon {
class: 'javax.swing.ImageIcon';
image: '@|image("workstation.png")';
}
The given class must follow the JavaBeans pattern; its properties can be customized directly in CSS (icon, label, foreground).
For information about how to use JavaBeans in CSS and how to use the class property, refer to Class Property.
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. All rights reserved. Legal terms. | PREVIOUS NEXT |