You can customize the object representation according to its
states and alarms using CSS attribute selectors. An attribute
selector is based on the
IltObject attribute "
objectState
" (see
ilog.tgo.model.IltObject#ObjectStateAttribute
) and is composed of the attribute name and the state name
information.
The selectors can be used to customize the
object graphic representation according to the different state
and alarm dictionaries.
It is recommended that, when you specify a
graphic property in an attribute selector, you provide an object
selector that sets a default value to the property. This value
will be used when the attribute is not defined. In other words,
you can customize your objects according to the attribute values,
but keep in mind that a consistent graphic representation should
also be available when the attribute is not set in a specific
object. Observe this policy whenever you create CSS attribute
selectors to customize the object graphic representation based on
states and alarms.
The following example illustrates this policy in a scenario that
creates a graphic representation based on the presence of the
state
IltMisc.SecState.HighTemperatureWarning
:
object."ilog.tgo.model.IltObject"["objectState.Misc.SecState.HighTemperatureWar
ning"] {
labelForeground: red;
}
object."ilog.tgo.model.IltObject" {
labelForeground: '';
}
In this scenario, when the state
IltMisc.SecState.HighTemperatureWarning
is present in the object, the label of the object changes to red.
When the state is no longer present, the label color is set to
its default value.