| Styling > Using Cascading Style Sheets > Changing the Icon Color of Predefined Business Objects |
Changing the Icon Color of Predefined Business Objects |
INDEX
PREVIOUS
NEXT
|
This use case shows you how to change the color of business objects that belong to a predefined business class. It applies to the tree, network, and equipment graphic components.
In this case, 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.
<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>
object.myNetworkElement {
foreground: '#FF0000';
}
In this example, the foreground color of the icon representing business objects of the class myNetworkElement is set to red.
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.
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. All rights reserved. Legal terms. | PREVIOUS NEXT |