ilog.tgo.resource
Class IltSettings

java.lang.Object
  extended by ilog.tgo.resource.IltSettings
All Implemented Interfaces:
IlvStylable

public class IltSettings
extends Object
implements IlvStylable

This is the JTGO top-level global settings class. It contains the default configuration for the ILOG JTGO look and feel. It also applies user-defined global settings defined in a CSS file.

The ILOG JTGO look and feel stores information about how object attributes, states and alarm information are mapped to decorations in order to create the graphic representation.

Each property is identified by a name, and can be retrieved or set through the methods GetValue and SetValue. Properties can also be set by first defining the settings within a CSS file and applying the settings using the setStylesheet methods. For settings details within CSS files please refer to classes in the ilog.tgo.resource.css.handlers package.

The ILOG JTGO look and feel characteristics can be customized as follows:

General settings: modify the icons used to represent the information window, system window and subnetwork status. The following property names can be set:

Miscellaneous states: modify the IltMisc.SecState representation. Property names are defined by the state name and the Icon suffix, for example:

 
 IltSettings.SetValue("Misc.SecState.DoorAjar.Icon", image)
 

Performance, SAN and SNMP states: modify IltPerformance.SecState, IltSAN.SecState and IltSNMP state representation, so that the state can be represented as a gauge, a chart or a counter. Property names are defined by the state name, and a suffix that determines the type of configuration that is applied. This suffix can be:

The following example illustrates how to customize the representation of the state IltPerformance.SecState.Input.
 IltSettings.SetValue("Performance.SecState.Input.Type", IltDecorationType.Chart);
 IltSettings.SetValue("Performance.SecState.Input.Chart", new IltChartMapping(chart1, chart2));
 

SONET protections: modify the IltSONET.Protection representation. The property name is defined by the prefix SONET.Protection., the protection name and the Icon suffix. For example:

 
 IltSettings.SetValue("SONET.Protection.Exercisor.Icon", image)
 

OSI primary states: modify the icons displayed according to the primary states set in the object. The following properties can be customized:

Bellcore secondary state and OSI status: modify IltBellcore.SecState, IltOSI.Availability, IltOSI.Control, IltOSI.Repair, IltOSI.Procedural and IltOSI.Standby state representation. Property names are defined by the state name, and a suffix that determines the object condition according to its primary state. This suffix can be:

The following example illustrates how to customize the representation of the state IltBellcore.SecState.Blocked.
 IltSettings.SetValue("Bellcore.SecState.Blocked.OOS.Icon", blockedOOS);
 IltSettings.SetValue("Bellcore.SecState.Blocked.NT.Icon", blockedNT);
 IltSettings.SetValue("Bellcore.SecState.Blocked.CT.Icon", blockedCT);
 

Alarm Severities: modify the alarm severity configuration. The following properties can be customized:

The following properties can be used to customize the representation of raw alarms in the business objects:

For instance Alarm.Raw.Critical.Color.

The following properties can be used to customize the representation of impact alarms in the business objects:

For instance Alarm.Impact.CriticalHigh.Color.

The following properties can be used to customize the representation of traps in the business objects:

For instance: Trap.Type.LinkFailure.Color.

The following properties can be used to toggle the offscreen buffered image optimizations (enabled by default). Complex graphic objects are expensive to render and update, taking extra resources every time they are computed. The offscreen buffered image technique renders such complex graphics into a buffered image kept in memory. This takes advantage of the fact that in memory, buffered images are quickly rendered. This process consumes extra memory due to the number of cached resources, therefore it can be disabled when memory footprint is critical.

To disable the offscreen performance improvements for polygons, do the following:
 
 IltSettings.SetValue("OffscreenCache.Polygon", Boolean.FALSE);
 
Similarly, to enable the performance improvements for BTS antennas, do the following:
 IltSettings.SetValue("OffscreenCache.BTS", Boolean.TRUE);
 

Since:
JTGO 4.0
See Also:
IltAlarmRenderer, IltBellcoreRenderer, IltMiscRenderer, IltOSIRenderer, IltPerformanceRenderer, IltSANRenderer, IltSNMPRenderer, IltSONETRenderer, IltInfoWindowRenderer, IltSystemWindowRenderer, IltSubnetworkRenderer, IltCardRenderer, IltCardCarrierRenderer, IltLedRenderer, IltLinkRenderer, IltNetworkElementRenderer, IltOffPageConnectorRenderer, IltObjectRenderer, IltPortRenderer, IltShelfRenderer

Field Summary
 
Fields inherited from interface ilog.views.util.styling.IlvStylable
APPLIED_RULE_MASK, BAD_CLASS_MASK, BAD_PROP_MASK, BAD_PROP_WITH_STACK_MASK, CREATED_MASK, DECL_MASK, DECL_VALUE_MASK, FAILED_CONVERSIONS_MASK, TIME_REPORT_MASK, WARNING_PROP_MASK
 
Constructor Summary
IltSettings()
          Creates an instance of IltSettings with a default context.
IltSettings(IlpContext context)
          Creates an instance of IltSettings with the given context.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds a property modification listener.
 IlpContext getContext()
          Retrieves current application context.
static Image GetImage(Object key)
          Returns an image property value.
static IltLookAndFeel getLookAndFeel()
          Returns the current look and feel.
 int getStyleSheetDebugMask()
          Returns the current debug level.
 String[] getStyleSheets()
          Returns the cascaded style sheets.
 String getStyleSheets(int index)
          Returns one of the cascaded style sheets.
static Object GetValue(Object key)
          Returns the value of a property.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes a property modification listener.
static void setLookAndFeel(IltLookAndFeel lf)
          Sets a new Look and Feel.
 void setStyleSheetDebugMask(int mask)
          Sets the debug level while parsing the style sheets.
 void setStyleSheets(int index, String css)
          Changes one of the cascading style sheets.
 void setStyleSheets(String[] css)
          Sets the cascading style sheets.
static Object SetValue(Object key, Object value)
          Sets the value of a property in the current configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IltSettings

public IltSettings()
Creates an instance of IltSettings with a default context.

Since:
JViews 7.5

IltSettings

public IltSettings(IlpContext context)
Creates an instance of IltSettings with the given context.

Parameters:
context - The used context.
Since:
JViews 7.5
Method Detail

getLookAndFeel

public static IltLookAndFeel getLookAndFeel()
Returns the current look and feel.

Returns:
The current look and feel.
Since:
JViews 7.5

setLookAndFeel

public static void setLookAndFeel(IltLookAndFeel lf)
Sets a new Look and Feel.

This method sets new configuration values to the global settings.

This new configuration is not immediately applied to the objects that are already being displayed in graphic views. These objects will be updated once needed, that is:

Parameters:
lf - The new look and feel.
Since:
JViews 7.5

GetValue

public static Object GetValue(Object key)
Returns the value of a property.

Parameters:
key - The property identifier.

SetValue

public static Object SetValue(Object key,
                              Object value)
Sets the value of a property in the current configuration.

Parameters:
key - The property identifier.
value - The property value.

GetImage

public static Image GetImage(Object key)
Returns an image property value.

Parameters:
key - The property identifier.
Returns:
The Image that is defined for key.

setStyleSheets

public void setStyleSheets(String[] css)
                    throws IlvStylingException
Description copied from interface: IlvStylable
Sets the cascading style sheets. Each element can be a URL, a filename, or the style sheet string directly. The order is by priority (the last CSS takes over).

This is a bound property. It means the implementation should fire a PropertyChange event to all registered PropertyChangeListeners after setting the new value.

Specified by:
setStyleSheets in interface IlvStylable
Parameters:
css - An array of strings representing the CSS document (usually with a file or URL with .css suffix).
Throws:
IlvStylingException
Since:
JViews 7.5

setStyleSheets

public void setStyleSheets(int index,
                           String css)
                    throws IlvStylingException
Description copied from interface: IlvStylable
Changes one of the cascading style sheets. A style sheet can be a URL, a filename, or the style sheet string directly. This method is an alternative to IlvStylable.setStyleSheets(java.lang.String[]). It lets you change one particular style sheet file, instead of setting the whole style sheet array.

This is a bound property. It means the implementation should fire a PropertyChange event to all registered PropertyChangeListeners after setting the new value. The old and new value arguments of the event represent the whole array.

Specified by:
setStyleSheets in interface IlvStylable
Parameters:
index - The index of the style sheet to replace.
css - A String representing the CSS document (usually with a file or URL with .css suffix).
Throws:
IlvStylingException
Since:
JViews 7.5
See Also:
IlvStylable.setStyleSheets(java.lang.String[])

getStyleSheets

public String[] getStyleSheets()
Description copied from interface: IlvStylable
Returns the cascaded style sheets.

Specified by:
getStyleSheets in interface IlvStylable
Returns:
An array containing the URLs or file names of the style sheets.
Since:
JViews 7.5

getStyleSheets

public String getStyleSheets(int index)
Description copied from interface: IlvStylable
Returns one of the cascaded style sheets.

Specified by:
getStyleSheets in interface IlvStylable
Parameters:
index - The position of the cascading style sheet to return.
Returns:
The URL or file name of the ith index style sheet.
Since:
JViews 7.5

setStyleSheetDebugMask

public void setStyleSheetDebugMask(int mask)
Description copied from interface: IlvStylable
Sets the debug level while parsing the style sheets. Set this property before calling IlvStylable.setStyleSheets(java.lang.String[]) to debug problems during configuration. This is a bound property. It means the implementation should fire a PropertyChange event to all registered PropertyChangeListeners after setting the new value.

Specified by:
setStyleSheetDebugMask in interface IlvStylable
Parameters:
mask - The debug mask, expressed as an OR combination of the predefined flags.
Since:
JViews 7.5
See Also:
IlvStylable.setStyleSheets(java.lang.String[]), IlvStylable.getStyleSheetDebugMask(), IlvStylable.APPLIED_RULE_MASK, IlvStylable.BAD_CLASS_MASK, IlvStylable.BAD_PROP_MASK, IlvStylable.BAD_PROP_WITH_STACK_MASK, IlvStylable.CREATED_MASK, IlvStylable.DECL_MASK, IlvStylable.DECL_VALUE_MASK, IlvStylable.FAILED_CONVERSIONS_MASK, IlvStylable.TIME_REPORT_MASK, IlvStylable.WARNING_PROP_MASK

getStyleSheetDebugMask

public int getStyleSheetDebugMask()
Description copied from interface: IlvStylable
Returns the current debug level.

Specified by:
getStyleSheetDebugMask in interface IlvStylable
Since:
JViews 7.5
See Also:
IlvStylable.setStyleSheetDebugMask(int)

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a property modification listener.

Specified by:
addPropertyChangeListener in interface IlvStylable
Parameters:
listener - The listener to add.

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a property modification listener.

Specified by:
removePropertyChangeListener in interface IlvStylable
Parameters:
listener - The listener to remove.

getContext

public IlpContext getContext()
Retrieves current application context.

Returns:
The current application context.
Since:
JViews 7.5


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.