public class IltAlarmRenderer extends IltSettingsRenderer
This class shows all the properties that can be customized using cascading style sheets.
The CSS configuration can be applied to the global settings
(@link ilog.tgo.resource.IltSettings), using
IltSettings.setStyleSheets(String[])
.
The following example shows how this class can be configured in a CSS file:
Settings { alarm: true; } Alarm { rawIcon: '@|image("icon1.png")'; impactIcon: '@|image("icon2.png")'; severities[0]: @+severity0; impactSeverities[0]: @+impactSeverity0; } Subobject#severity0 { class: 'ilog.tgo.model.IltAlarm$Severity'; name: "Informational"; severity: 210; } Subobject#impactSeverity0 { class: 'ilog.tgo.model.IltAlarm$ImpactSeverity'; name: "InformationalLow"; severity: 220; } setting."ilog.tgo.model.IltAlarm.Severity"[name="Alarm.Raw.Critical"] { color: orange; darkColor: blue; brightColor: yellow; abbreviation: RC; description: "Raw Critical"; icon: '@|image("icon1.png")'; } setting."ilog.tgo.model.IltAlarm.ImpactSeverity"[name="Alarm.Impact.CriticalHigh"] { color: orange; darkColor: green; brightColor: yellow; abbreviation: ICH; description: "Impact Critical High"; icon: '@|image("icon1.png")'; }
To customize the global settings using Java,
use IltSettings.SetValue(Object, Object)
.
The following extract illustrates how this configuration can be
accomplished:
IltSettings.SetValue("Alarm.Raw.Icon", rawIcon); IltSettings.SetValue("Alarm.Impact.Icon", impactIcon); IltSettings.SetValue("Alarm.Raw.Severity.Icon", rawSeverityIcon); IltSettings.SetValue("Alarm.Impact.Severity.Icon", impactSeverityIcon); IltSettings.SetValue("Alarm.Raw.Critical.Color", myAlarmColor); IltSettings.SetValue("Alarm.Raw.Critical.BrightColor", myAlarmBrightColor); IltSettings.SetValue("Alarm.Raw.Critical.DarkColor", myAlarmDarkColor); IltSettings.SetValue("Alarm.Raw.Critical.Abbreviation", "C"); IltSettings.SetValue("Alarm.Raw.Critical.Description", "Critical Alarms");
Constructor and Description |
---|
IltAlarmRenderer()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
String |
getCSSClass()
Returns the business class used in the selector.
|
String |
getCSSType()
Returns the type used in CSS selectors.
|
void |
reset()
Resets the configuration of the alarms and traps.
|
void |
reset(Object b)
Resets the configuration that is in the bean.
|
void |
setImpactIcon(Image impactIcon)
Sets the impact severity icon.
|
void |
setImpactSeverities(IltAlarm.ImpactSeverity[] impactSeverities)
Adds alarm impact severities to the alarm system.
|
void |
setImpactSeverityIcon(Image impactIcon)
Sets the impact severity icon.
|
void |
setRawIcon(Image rawIcon)
Sets the raw severity icon.
|
void |
setRawSeverityIcon(Image rawIcon)
Sets raw severity icon.
|
void |
setSeverities(IltAlarm.Severity[] severities)
Adds alarm raw severities to the alarm system.
|
void |
setTraps(IltTrap.Type[] traps)
Adds trap types to the alarm system.
|
attach, detach, getChildrenAsArray, isEnabled, setEnabled
public void reset()
reset
in class IltSettingsRenderer
public void reset(Object b)
This method prepares the bean to be configured with the CSS information.
reset
in class IltSettingsRenderer
b
- Configuration beanpublic final String getCSSClass()
A valid CSS selector is:
Alarm { severities[0]: @+severity0; impactSeverities[0]: @+impactSeverity0; }
null
is returned.public final String getCSSType()
A valid CSS selector is:
Alarm { severities[0]: @+severity0; impactSeverities[0]: @+impactSeverity0; }
Alarm
.public void setRawIcon(Image rawIcon)
This icon is displayed when an object has raw alarms that are
not currently visible due to the primary alarm state definition.
CSS settings:
Settings { alarm: true; } Alarm { rawIcon: '@|image("icon1.png")'; }
rawIcon
- The icon to be set.public void setImpactIcon(Image impactIcon)
This icon is displayed when an object has impact alarms that are currently not visible. This is the default behavior.
CSS settings:
Settings { alarm: true; } Alarm { impactIcon: '@|image("icon2.png")'; }
impactIcon
- The icon to be set.public void setRawSeverityIcon(Image rawIcon)
This icon is displayed to represent raw alarms in either the table or the tree components. It is displayed using the tiny look and feel.
CSS settings:
Settings { alarm: true; } Alarm { rawSeverityIcon: '@|image("icon1.png")'; }
rawIcon
- The icon to be setpublic void setImpactSeverityIcon(Image impactIcon)
This icon is displayed to represent an impact alarm in either the table
or the tree components. It is displayed using the tiny look and feel.
CSS settings:
Settings { alarm: true; } Alarm { impactSeverityIcon: '@|image("icon2.png")'; }
public void setSeverities(IltAlarm.Severity[] severities)
CSS settings:
Settings { alarm: true; } Alarm { severities[0]: @+severityCritical0; } Subobject#severityCritical0 { class: 'ilog.tgo.model.IltAlarm$Severity'; name: "Alarm.Raw.Critical-UsrDf"; severity: 210; }
severities
- The alarm severity objects to be added to the alarm
system.public void setImpactSeverities(IltAlarm.ImpactSeverity[] impactSeverities)
CSS settings:
Settings { alarm: true; } Alarm { impactSeverities[0]: @+impactSeverityCriticalLow0; } Subobject#impactSeverityCriticalLow0 { class: 'ilog.tgo.model.IltAlarm$ImpactSeverity'; name: "Alarm.Impact.CriticalLow-UsrDf"; severity: 220; }
impactSeverities
- The alarm severity objects to be added to the
alarm system.public void setTraps(IltTrap.Type[] traps)
traps
- The trap type objects to be added to the alarm system.
CSS settings:
Settings { alarm: true; } Alarm { traps[0]: @+trapColdStart0; } Subobject#trapColdStart0 { class: 'ilog.tgo.model.IltTrap$Type'; name: "Trap.Type.ColdStart-UsrDf"; severity: 230; }
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.