Styling > Using Cascading Style Sheets > Customizing Network and Equipment Nodes > User-Defined Business Objects

To customize the default graphic representation of user-defined business objects in the network and equipment, refer to Customizing User-Defined Business Objects.

Advanced Customization

To further customize the network and equipment node rendering, you may also:

Using an IlvGraphic

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.

How to Use an IlvGraphic to Generate a Network Node Representation

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.

Using a JComponent

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.

How to Use a JComponent to Generate a Network or Equipment Node Representation
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.