Changing the icon color of predefined business objects

In these components, the predefined business class is an extension of IltNetworkElement. The color is customized with the property foreground .
The following extract of XML represents the definition of a business class that extends the predefined business class IltNetworkElement.

How to extend a predefined business class

<class>
  <name>myNetworkElement</name>
    <superClass>ilog.tgo.model.IltNetworkElement</superClass>
    <attribute>
      <name>siteName</name> <javaClass>java.lang.String</javaClass>
    </attribute>
    <attribute>
       <name>customerName</name>  <javaClass>java.lang.String</javaClass>
    </attribute>
</class>

How to use literal values for customizing colors

object.myNetworkElement {
    foreground: '#FF0000';
}
In this example, the foreground color of the icon representing business objects of the class myNetworkElement is set to red.

How to customize the icon color based on specific attribute values

object.myNetworkElement[type=NE] {
       foreground:'#FFFFFF';
}
object.myNetworkElement[type=MD] {
       foreground:'#C0C0C0';
}
object.myNetworkElement[type=Server] {
       foreground:'#FFCC00';
}
object.myNetworkElement[type=BSC] {
       foreground:'#FFB200';
}
object.myNetworkElement[type=Desktop] {
       foreground:'#FF0000';
}
In this example, the foreground color of the icon representing business objects of the class myNetworkElement is set to depend on the value of the attribute type defined in the class IltNetworkElement . So myNetworkElement with the type NE will have a white foreground.