|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.tgo.resource.IltSettings
public class IltSettings
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:
Link media icons: modify the
IltLink.Media representation. The property name
is defined by the prefix Link.Media., the media name and
the Icon suffix. For example:
IltSettings.SetValue("Link.Media.Fiber.Icon", image)
Link technology icons and colors: modify the
IltLink.Technology representation. The property
name is defined by the prefix Link.Technology., the
technology name and the Icon (or Color)
suffix. For example:
IltSettings.SetValue("Link.Technology.WirelessEdge.Icon", image)
IltSettings.SetValue("Link.Technology.WirelessEdge.Color", color)
Network element function icons: modify the
IltNetworkElement.Function representation. The
property name is defined by the prefix
NetworkElement.Function., the function name and the
Icon suffix. For example:
IltSettings.SetValue("NetworkElement.Function.ADM.Icon", image)
Object type labels: for the objects that contain
a type attribute, such as IltNetworkElement,
IltShelf, IltPort and IltLed,
the type label is retrieved automatically from the ILOG JTGO resource
bundle. However, it is also possible to customize the textual
representation of the type so that it is appropriately displayed in a
table component. To customize the label representation, configure the
label value as illustrated in the example below:
IltSettings.SetValue("Led.Type.Circular.Label", "Circular")
IltSettings.SetValue("Port.Type.IEEE_1394_4f.Label", "IEEE 1394")
IltSettings.SetValue("NetworkElement.Type.NE.Label", "Network Element");
Network element family labels: by default, the
IltNetworkElement.Family representation is a
label retrieved automatically from the ILOG JTGO resource bundle. As you
create new families, register the appropriate entries in the resource
bundle. However, it is also possible to set the family label here,
using the following setting name:
NetworkElement.Family.YOUR FAMILY NAME.Label, as
illustrated below:
IltSettings.SetValue("NetworkElement.Family.FCOT.Label", "FCOT")
Network element function icon position: according
to the network element type, this specifies whether the function icon
is placed at the center of the network element base or at the bottom
left position. To configure the icon position, modify the
IltNetworkElement.Type representation. The
property name is defined by the prefix NetworkElement.Type.,
the type name and CenterFunctionIcon. The example below
illustrates this configuration:
IltSettings.SetValue("NetworkElement.Type.NE.CenterFunctionIcon", Boolean.FALSE);
Network element type base renderers: modify the
IltNetworkElement.Type base representation. The
property name is defined by the prefix NetworkElement.Type.,
the type name and the Renderer suffix. The property value
should be an IltBaseRendererFactory that creates
IltNEBaseRenderer instances. For
example:
IltSettings.SetValue("NetworkElement.Type.NE.Renderer", new IltNEImageBaseRendererFactory(...))
Card type base renderers: modify the
IltCard.Type base representation. The property
name is defined by the prefix Card.Type., the type name
and the Renderer suffix. The property value should be
an IltBaseRendererFactory that creates
IltCardBaseRenderer instances. For
example:
IltSettings.SetValue("Card.Type.Standard.Renderer", new IltCardImageBaseRendererFactory(...))
Card carrier type base renderers: modify the
IltCardCarrier.Type base representation. The
property name is defined by the prefix CardCarrier.Type.,
the type name and the Renderer suffix. The property value
should be an IltBaseRendererFactory that creates
IltCardCarrierBaseRenderer instances.
For example:
IltBaseRendererFactory yourCardCarrierBaseRendererFactory = ...;
IltSettings.SetValue("CardCarrier.Type.Standard.Renderer", yourCardCarrierBaseRendererFactory)
Port type base renderers: modify the
IltPort.Type base representation. The property
name is defined by the prefix Port.Type., the type name
and the Renderer suffix. The property value should be an
IltBaseRendererFactory that creates
IltPortBaseRenderer instances. For
example:
IltSettings.SetValue("Port.Type.IEEE_1394_4f.Renderer", new IltPortImageBaseRendererFactory(...))
Led type base renderers: modify the
IltLed.Type base representation. The property
name is defined by the prefix Led.Type., the type name and
the Renderer suffix. The property value should be an
IltBaseRendererFactory that creates
IltLedBaseRenderer instances. For
example:
IltSettings.SetValue("Port.Type.Circular.Renderer", new IltLedImageBaseRendererFactory(...))
Off-page connector type base renderers: modify the
IltOffPageConnector.Type base representation. The
property name is defined by the prefix
OffPageConnector.Type., the type name and the
Renderer suffix. The property value should be an
IltBaseRendererFactory that creates
IltOPCBaseRenderer instances. For
example:
IltSettings.SetValue("OffPageConnector.Type.Standard.Renderer", new IltOPCImageBaseRendererFactory(...))
Miscellaneous states: modify the
Performance, SAN and SNMP states: modify
SONET protections: modify the
Bellcore secondary state and OSI status: modify
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:
The following properties can be used to customize the representation of
impact alarms in the business objects:
The following properties can be used to customize the representation of
traps in the business objects:
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.
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:
This is a bound property. It
means the implementation should fire a
This is a bound property. It means the implementation should
fire a
IltMisc.SecState representation.
Property names are defined by the state name and the Icon
suffix, for example:
IltSettings.SetValue("Misc.SecState.DoorAjar.Icon", image)
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 IltDecorationType.Gauge.
IltGaugeMapping.
IltChartMapping.
IltCounterMapping.
IltPerformance.SecState.Input.
IltSettings.SetValue("Performance.SecState.Input.Type", IltDecorationType.Chart);
IltSettings.SetValue("Performance.SecState.Input.Chart", new IltChartMapping(chart1, chart2));
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)
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);
For instance Alarm.Raw.Critical.Color.
For instance Alarm.Impact.CriticalHigh.Color.
For instance: Trap.Type.LinkFailure.Color.
To disable the offscreen performance improvements for polygons, do the
following:
IltPolyGroup and IltLinearGroup.
IltBTSAntenna.
IltSettings.SetValue("OffscreenCache.Polygon", Boolean.FALSE);
Similarly, to enable the performance improvements for BTS antennas, do the
following:
IltSettings.SetValue("OffscreenCache.BTS", Boolean.TRUE);
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
voidaddPropertyChangeListener(PropertyChangeListener listener)
Adds a property modification listener.
IlpContextgetContext()
Retrieves current application context.
static ImageGetImage(Object key)
Returns an image property value.
static IltLookAndFeelgetLookAndFeel()
Returns the current look and feel.
intgetStyleSheetDebugMask()
Returns the current debug level.
String[]getStyleSheets()
Returns the cascaded style sheets.
StringgetStyleSheets(int index)
Returns one of the cascaded style sheets.
static ObjectGetValue(Object key)
Returns the value of a property.
voidremovePropertyChangeListener(PropertyChangeListener listener)
Removes a property modification listener.
static voidsetLookAndFeel(IltLookAndFeel lf)
Sets a new Look and Feel.
voidsetStyleSheetDebugMask(int mask)
Sets the debug level while parsing the style sheets.
voidsetStyleSheets(int index,
String css)
Changes one of the cascading style sheets.
voidsetStyleSheets(String[] css)
Sets the cascading style sheets.
static ObjectSetValue(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()
IltSettings with a default context.
IltSettings
public IltSettings(IlpContext context)
IltSettings with the given context.
context - The used context.
Method Detail
getLookAndFeel
public static IltLookAndFeel getLookAndFeel()
setLookAndFeel
public static void setLookAndFeel(IltLookAndFeel lf)
IlpGraphicView.invalidateGraphics()
for more information.
lf - The new look and feel.
GetValue
public static Object GetValue(Object key)
key - The property identifier.
SetValue
public static Object SetValue(Object key,
Object value)
key - The property identifier.value - The property value.
GetImage
public static Image GetImage(Object key)
key - The property identifier.
Image that is defined for key.
setStyleSheets
public void setStyleSheets(String[] css)
throws IlvStylingException
IlvStylablePropertyChange
event to all registered PropertyChangeListeners after
setting the new value.
setStyleSheets in interface IlvStylable
css - An array of strings representing the CSS document (usually
with a file or URL with .css suffix).
IlvStylingException
setStyleSheets
public void setStyleSheets(int index,
String css)
throws IlvStylingException
IlvStylableIlvStylable.setStyleSheets(java.lang.String[]).
It lets you change one particular style sheet file, instead of setting
the whole style sheet array.
PropertyChange event to all registered
PropertyChangeListeners after setting the new value.
The old and new value arguments of the event represent the whole array.
setStyleSheets in interface IlvStylable
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).
IlvStylingExceptionIlvStylable.setStyleSheets(java.lang.String[])
getStyleSheets
public String[] getStyleSheets()
IlvStylable
getStyleSheets in interface IlvStylable
getStyleSheets
public String getStyleSheets(int index)
IlvStylable
getStyleSheets in interface IlvStylable
index - The position of the cascading style sheet to return.
index style sheet.
setStyleSheetDebugMask
public void setStyleSheetDebugMask(int mask)
IlvStylableIlvStylable.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.
setStyleSheetDebugMask in interface IlvStylable
mask - The debug mask, expressed as an OR combination of the
predefined flags.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()
IlvStylable
getStyleSheetDebugMask in interface IlvStylable
IlvStylable.setStyleSheetDebugMask(int)
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener in interface IlvStylable
listener - The listener to add.
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener in interface IlvStylable
listener - The listener to remove.
getContext
public IlpContext getContext()
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV CLASS Documentation homepage
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Copyright © 1996-2007 ILOG S.A. All rights reserved. Documentation homepage. . All Rights Reserved.