ilog.tgo.resource.renderer
Class IltAlarmRenderer

java.lang.Object
  extended by ilog.tgo.resource.renderer.IltSettingsRenderer
      extended by ilog.tgo.resource.renderer.IltAlarmRenderer
All Implemented Interfaces:
ilog.tgo.resource.css.internal.IltSettingsCSSEntity

public class IltAlarmRenderer
extends IltSettingsRenderer

This class illustrates how you can configure alarms and traps using cascading style sheets.

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");
 

Since:
JViews 7.5

Constructor Summary
IltAlarmRenderer()
          Default constructor
 
Method Summary
 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.
 
Methods inherited from class ilog.tgo.resource.renderer.IltSettingsRenderer
attach, detach, getChildrenAsArray, isEnabled, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IltAlarmRenderer

public IltAlarmRenderer()
Default constructor

Method Detail

reset

public void reset()
Resets the configuration of the alarms and traps.

Specified by:
reset in class IltSettingsRenderer

reset

public void reset(Object b)
Resets the configuration that is in the bean.

This method prepares the bean to be configured with the CSS information.

Overrides:
reset in class IltSettingsRenderer
Parameters:
b - Configuration bean
Internal method or field: do not use!

getCSSClass

public final String getCSSClass()
Returns the business class used in the selector.

A valid CSS selector is:

 Alarm {
   severities[0]: @+severity0;
   impactSeverities[0]: @+impactSeverity0;
 }
 

Returns:
As this configuration does not use a business class parameter, null is returned.

getCSSType

public final String getCSSType()
Returns the type used in CSS selectors.

A valid CSS selector is:

 Alarm {
   severities[0]: @+severity0;
   impactSeverities[0]: @+impactSeverity0;
 }
 

Returns:
The Alarm.

setRawIcon

public void setRawIcon(Image rawIcon)
Sets the raw severity icon.

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")';
 }
 

Parameters:
rawIcon - The icon to be set.

setImpactIcon

public void setImpactIcon(Image impactIcon)
Sets the impact severity icon.

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")';
 }
 

Parameters:
impactIcon - The icon to be set.

setRawSeverityIcon

public void setRawSeverityIcon(Image rawIcon)
Sets raw severity icon.

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")';
 }
 

Parameters:
rawIcon - The icon to be set

setImpactSeverityIcon

public void setImpactSeverityIcon(Image impactIcon)
Sets the impact severity icon.

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")';
 }
 


setSeverities

public void setSeverities(IltAlarm.Severity[] severities)
Adds alarm raw severities to the alarm system.

CSS settings:

 Settings {
    alarm: true;
 }
 Alarm {
    severities[0]: @+severityCritical0;
 }
 Subobject#severityCritical0 {
    class: 'ilog.tgo.model.IltAlarm$Severity';
    name: "Alarm.Raw.Critical-UsrDf";
    severity: 210;
 }
 

Parameters:
severities - The alarm severity objects to be added to the alarm system.

setImpactSeverities

public void setImpactSeverities(IltAlarm.ImpactSeverity[] impactSeverities)
Adds alarm impact severities to the alarm system.

CSS settings:

 Settings {
    alarm: true;
 }
 Alarm {
    impactSeverities[0]: @+impactSeverityCriticalLow0;
 }
 Subobject#impactSeverityCriticalLow0 {
    class: 'ilog.tgo.model.IltAlarm$ImpactSeverity';
    name: "Alarm.Impact.CriticalLow-UsrDf";
    severity: 220;
 }
 

Parameters:
impactSeverities - The alarm severity objects to be added to the alarm system.

setTraps

public void setTraps(IltTrap.Type[] traps)
Adds trap types to the alarm system.

Parameters:
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 © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.