| Styling > Customizing Object States > Customizing Alarm Count Attributes |
Customizing Alarm Count Attributes |
INDEX
PREVIOUS
NEXT
|
The alarm count attributes of IltObject are represented in the table component using:
IltDefaultAlarmCountGraphic for raw alarms and traps
IltImpactAlarmCountGraphic for impact alarms.
The following table interprets some alarm count graphic representations:
The alarm count representation can be customized using the following CSS properties:
The following CSS functions are useful to provide values for the alarm count representation:
The following style sheet extract reproduces the JViews TGO 4.0 styling for alarm count attributes:
// IltObject alarmCount attribute
object."ilog.tgo.model.IltObject/alarmCount" {
class: ilog.tgo.graphic.IltDefaultAlarmCountGraphic;
label: '@|alarmCount()';
toolTipText: '@|alarmSummary()';
labelBackgroundColor: '@|severityColor(@|highestNewSeverity())';
outerBorderColor: '@|severityColor(@|highestSeverity())';
innerBorderColor: white;
innerBorderVisible: '@|highestNewSeverity()!=null && @|highestAcknowledgedSeverity()!=null';
}
// IltObject newAlarmCount attribute
object."ilog.tgo.model.IltObject/newAlarmCount" {
class: ilog.tgo.graphic.IltDefaultAlarmCountGraphic;
label: '@|newAlarmCount()';
toolTipText: '@|newAlarmSummary()';
labelBackgroundColor: '@|severityColor(@|highestNewSeverity())';
outerBorderColor: '@|severityColor(@|highestNewSeverity())';
innerBorderColor: white;
innerBorderVisible: false;
}
// IltObject impactAlarmCount attribute
object."ilog.tgo.model.IltObject/impactAlarmCount" {
class: ilog.tgo.graphic.IltImpactAlarmCountGraphic;
label: '@|alarmCount("Impact")';
toolTipText: '@|alarmSummary("Impact")';
labelBackgroundColor: '@|severityColor(@|highestNewSeverity("Impact"))';
outerBorderColor: '@|severityColor(@|highestSeverity("Impact"))';
innerBorderColor: white;
innerBorderVisible: '@|highestNewSeverity("Impact")!=null && @|highestAcknowledgedSeverity("Impact")!=null';
}
// IltObject newImpactAlarmCount attribute
object."ilog.tgo.model.IltObject/newImpactAlarmCount" {
class: ilog.tgo.graphic.IltImpactAlarmCountGraphic;
label: '@|newAlarmCount("Impact")';
toolTipText: '@|alarmSummary("Impact")';
labelBackgroundColor: '@|severityColor(@|highestNewSeverity("Impact"))';
outerBorderColor: '@|severityColor(@|highestNewSeverity("Impact"))';
innerBorderColor: white;
innerBorderVisible: false;
}
The following style sheet extract reproduces the styling obtained in JViews TGO 3.5 for the IltObject alarm count attributes. You may want to use it to improve performance or to ensure compatibility with previous versions of JViews TGO:
// IltObject alarmCount attribute
object."ilog.tgo.model.IltObject/alarmCount" {
class: javax.swing.JLabel;
text: @|alarmCount();
toolTipText: @|alarmCount();
labelFont: sansserif-plain-12;
labelBackground: '@|severityColor(@|highestSeverity())';
}
// IltObject newAlarmCount attribute
object."ilog.tgo.model.IltObject/newAlarmCount" {
class: javax.swing.JLabel;
text: @|alarmCount();
toolTipText: @|alarmCount();
labelFont: sansserif-plain-12;
labelBackground: '@|severityColor(@|highestNewSeverity())';
}
// IltObject impactAlarmCount attribute
object."ilog.tgo.model.IltObject/impactAlarmCount" {
class: javax.swing.JLabel;
text: @|alarmCount("Impact");
toolTipText: @|alarmCount("Impact");
labelFont: sansserif-plain-12;
labelBackground: '@|severityColor(@|highestSeverity("Impact"))';
}
// IltObject newImpactAlarmCount attribute
object."ilog.tgo.model.IltObject/newImpactAlarmCount" {
class: javax.swing.JLabel;
text: @|newAlarmCount("Impact");
toolTipText: @|newAlarmCount("Impact");
labelFont: sansserif-plain-12;
labelBackground: '@|severityColor(@|highestNewSeverity("Impact"))';
}
Provided there is a MyObject business class, with super-class IltObject and a rawMajorAlarmCount attribute, the following style sheet produces an alarm count representation specific to raw alarms of severity Major.
// IltObject alarmCount attribute
object."MyObject/rawMajorAlarmCount" {
class: ilog.tgo.graphic.IltDefaultAlarmCountGraphic;
label: '@|newAlarmCount("Raw.Major")';
toolTipText: '@|newAlarmSummary("Raw.Major")';
labelBackgroundColor: '@|severityColor(@|highestNewSeverity("Raw.Major"))';
outerBorderColor: '@|severityColor(@|highestNewSeverity("Raw.Major"))';
innerBorderColor: white;
innerBorderVisible: false;
}
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. All rights reserved. Legal terms. | PREVIOUS NEXT |