Release Notes > JTGO 3.5 Release Notes > API Changes |
API Changes |
PREVIOUS NEXT |
This section presents what has changed in JTGO:
The network and equipment component configuration is now achieved through cascading style sheets (CSS). The CSS configuration is the preferred way of configuring your graphic components. In the next release of the product, the CSS configuration will totally replace the XML configuration.
With the cascading style sheet mechanism, you can configure the properties of the graphic components in the same way as the properties of the objects that are displayed by the graphic components.
If you already have a network or equipment configuration in XML format, nothing changes for you, as the XML configuration has not been modified and is still supported. However, it is recommended that you migrate to the new CSS configuration. You can convert your network and equipment XML configuration files with the help of the standalone program configtocss
, which is located in <installdir>/bin/configtocss
.
The classes IlpNetwork
and IlpEquipment
present the following changes:
The following classes have been introduced to allow you to configure the network and equipment components using cascading style sheets:
ilog.cpl.network.renderer.IlpBackgroundsRenderer
ilog.cpl.network.renderer.IlpGraphLayoutRenderer
ilog.cpl.network.renderer.IlpInteractorRenderer
ilog.cpl.network.renderer.IlpLabelLayoutRenderer
ilog.cpl.network.renderer.IlpLinkLayoutRenderer
ilog.cpl.network.renderer.IlpOverviewRenderer
ilog.cpl.network.renderer.IlpPositioningRenderer
ilog.cpl.network.renderer.IlpToolBarRenderer
ilog.cpl.network.renderer.IlpViewRenderer
ilog.cpl.network.renderer.IlpZoomingRenderer
The following classes, which were used to configure the network and equipment components through XML, are now deprecated:
ilog.cpl.equipment.config.IlpAdapterConfiguration
ilog.cpl.equipment.config.IlpEquipmentConfiguration
ilog.cpl.equipment.config.IlpLayoutConfiguration
ilog.cpl.graphic.views.config.IlpActionConfiguration
ilog.cpl.graphic.views.config.IlpBackgroundConfiguration
ilog.cpl.graphic.views.config.IlpBackgroundPolicyConfiguration
ilog.cpl.graphic.views.config.IlpButtonConfiguration
ilog.cpl.graphic.views.config.IlpDefaultViewInteractorNameConfiguration
ilog.cpl.graphic.views.config.IlpLabelLayoutConfiguration
ilog.cpl.graphic.views.config.IlpNodeLayoutConfiguration
ilog.cpl.graphic.views.config.IlpOverviewConfiguration
ilog.cpl.graphic.views.config.IlpPopupMenuFactoryConfiguration
ilog.cpl.graphic.views.config.IlpPositionConfiguration
ilog.cpl.graphic.views.config.IlpPositionConverterConfiguration
ilog.cpl.graphic.views.config.IlpPositionPolicyConfiguration
ilog.cpl.graphic.views.config.IlpScrollBarConfiguration
ilog.cpl.graphic.views.config.IlpToolBarConfiguration
ilog.cpl.graphic.views.config.IlpViewConfiguration
ilog.cpl.graphic.views.config.IlpZoomConfiguration
ilog.cpl.network.config.IlpNetworkConfiguration
ilog.cpl.network.config.IlpLayoutConfiguration
ilog.cpl.network.config.IlpLinkLayoutConfiguration
void setStyleSheets(String[] files)
: changes the graphic component configuration to use a new set of CSS files.
String[] getStyleSheets()
: retrieves the current CSS files used to configure the graphic component.
void setStyleSheets(int index, String file)
: adds a new CSS file to the list of files used by the graphic component.
String getStyleSheet(int index)
: retrieves the CSS file identified by the given index.
void setStyleSheetDebugMask(int mask)
: sets a debug mask which helps you debug the configuration of your graphic component.
int getStyleSheetDebugMask()
: retrieves the current debug mask.
void performLabelLayout()
: executes the label layout configured for the network or equipment component.
void resetConfiguration
: resets the configuration of the graphic component to the default configuration.
IlpGraphicViewStyleManager getStyleManager()
IlpStyle getStyle()
void applyConfiguration (Ilp(Network/Equipment)Configuration config)
void applyAdditionalConfiguration (Ilp(Network/Equipment)Configuration config)
void parseConfiguration (String configurationName)
void parseConfiguration (URL configurationURL)
IlpNetwork (IlpNetworkConfiguration)
IlpNetwork (IlpNetworkConfiguration, IlpContext)
IlpEquipment (IlpEquipmentConfiguration)
IlpEquipment (IlpEquipmentConfiguration, IlpContext)
The class IlpNetworkView
presents the following changes:
void performLabelLayout()
: executes the label layout configured for the network or equipment component.
void setStyleSheets(String[] files)
: changes the graphic component configuration to use a new set of CSS files.
void setStyleSheets(int index, String file)
: replaces one file in the set of style sheets used to configure this graphic view.
String[] getStyleSheets()
: retrieves the current CSS files used to configure the component.
String getStyleSheet(int index)
: retrieves the CSS file identified by the given index
void setStyleSheetDebugMask(int mask)
: sets a debug mask which helps you debug the configuration of your component.
int getStyleSheetDebugMask()
: retrieves the current debug mask.
void invalidateGraphics()
addPseudoClass (IlpRepresentationObject ro, String pseudoclass)
: dynamically adds a pseudoclass to be used when rendering the given representation object. Pseudoclasses allow you to change the graphic representation of the objects depending on some view properties.
removePseudoClass (IlpRepresentationObject ro, String pseudoclass)
IlpGraphicViewStyleManager getStyleManager()
void setStyleManager (IlpGraphicViewStyleManager mgr)
IlpStyle getStyle()
The table component can now be customized through the CSS mechanism. Refer to the chapter Table Component in the User's Manual for a complete list of properties that you can change to customize the rendering of the component and of the objects displayed by it.
The table cell renderer implementation based on CSS information allows you to customize the predefined representation, and to define new representations using Java components or JViews IlvGraphic
objects.
You can style the representation of custom attributes added in the table component.
This configuration can be done using CSS with the attribute name as part of the CSS selector. Please refer to the sample <installdir>/samples/table/customAttributes
to see how this configuration is achieved.
The class IlpTable
presents the following changes:
void setStyleSheets(String[] files)
: changes the graphic component configuration to use a new set of CSS files.
String[] getStyleSheets()
: retrieves the current CSS files used to configure the component.
void setStyleSheets(int index, String file)
: adds a new CSS file to the list of files used by the graphic component.
String getStyleSheet(int index)
: retrieves the CSS file identified by the given index.
void setStyleSheetDebugMask(int mask)
: sets a debug mask which helps you debug the configuration of your component.
int getStyleSheetDebugMask()
: retrieves the current debug mask.
The class IlpTableView
presents the following changes:
void setStyleSheets(String[] files)
: changes the graphic component configuration to use a new set of CSS files.
void setStyleSheets(int index, String file)
: replaces one file in the set of style sheets used to configure this graphic view.
String[] getStyleSheets()
: retrieves the current CSS files used to configure the component.
String getStyleSheet(int index)
: retrieves the CSS file identified by the given index.
void setStyleSheetDebugMask(int mask)
: sets a debug mask which helps you debug the configuration of your component.
int getStyleSheetDebugMask()
: retrieves the current debug mask.
void invalidateGraphics()
addPseudoClass (IlpRepresentationObject ro, String pseudoclass)
: dynamically adds a pseudoclass to be used when rendering the given representation object. Pseudoclasses allow you to change the graphic representation of the objects depending on some view properties.
removePseudoClass (IlpRepresentationObject ro, String pseudoclass)
IlpGraphicViewStyleManager getStyleManager()
void setStyleManager (IlpGraphicViewStyleManager mgr)
IlpStyle getStyle()
The tree component can now be customized through the CSS mechanism. Please refer to the chapter Tree Component in the User's Manual for a complete list of properties that you can change to customize the rendering of the component and of the objects it displays.
The tree cell renderer implementation based on CSS information allows you to customize the predefined representation, and to define new representations using Java components or JViews IlvGraphic
objects.
The class IlpTree
presents the following changes:
void setStyleSheets(String[] files)
: changes the graphic component configuration to use a new set of CSS files.
String[] getStyleSheets()
: retrieves the current CSS files used to configure the component.
void setStyleSheets(int index, String file)
: adds a new CSS file to the list of files used by the graphic component.
String getStyleSheet(int index)
: retrieves the CSS file identified by the given index.
void setStyleSheetDebugMask(int mask)
: sets a debug mask which helps you debug the configuration of your component.
int getStyleSheetDebugMask()
: retrieves the current debug mask.
The class IlpTreeView
presents the following changes:
void setStyleSheets(String[] files)
: changes the graphic component configuration to use a new set of CSS files.
void setStyleSheets(int index, String file)
: replaces one file in the set of style sheets used to configure this graphic view.
String[] getStyleSheets()
: retrieves the current CSS files used to configure the component.
String getStyleSheet(int index)
: retrieves the CSS file identified by the given index.
void setStyleSheetDebugMask(int mask)
: sets a debug mask which helps you debug the configuration of your component.
int getStyleSheetDebugMask()
: retrieves the current debug mask.
void invalidateGraphics()
addPseudoClass (IlpRepresentationObject ro, String pseudoclass)
: dynamically adds a pseudoclass to be used when rendering the given representation object. Pseudoclasses allow you to change the graphic representation of the objects depending on some view properties.
removePseudoClass (IlpRepresentationObject ro, String pseudoclass)
IlpGraphicViewStyleManager getStyleManager()
void setStyleManager (IlpGraphicViewStyleManager mgr)
IlpStyle getStyle()
The objects in the JTGO web components can also be customized using cascading style sheets.
The following methods have been added to classes IlpWebNetwork
, IlpWebTable
and IlpWebTree
:
void setStyleSheets(String[] files)
: changes the web component configuration to use a new set of CSS files.
void setStyleSheets(int index, String file)
: replaces one file in the set of style sheets used to configure this graphic view.
String[] getStyleSheets()
: retrieves the current CSS files used to configure the web component.
String getStyleSheet(int index)
: retrieves the CSS file identified by the given index.
void setStyleSheetDebugMask(int mask)
: sets a debug mask which helps you debug the configuration of the web component.
int getStyleSheetDebugMask()
: retrieves the current debug mask.
The configuration of the network and equipment web components has also been changed to CSS. The CSS configuration files are now the preferred way to customize the web component and object representations.
The JTGO JSP tags have been modified to support the JTGO cascading style sheets (CSS) in the following way:
style
" of the tags <jtgo:table>
, <jtgo:tree>
, <jtgo:network>
, <jtgo:equipment>
has been removed. You can still use the tag <webc:set>
to set the styling of the components.
It is now possible to configure the label of custom and predefined business objects using a single CSS property which is label
. For example, to define that all objects, custom or predefined, retrieve the content of the label from the attribute name
, you declare the following CSS selector:
object { label: @name; }
Predefined business objects can have the state "Alarm Not Reporting" customized using the CSS property alarmNotReportingAbbreviation
. For example:
object."ilog.tgo.model.IltObject" { alarmNotReportingAbbreviation: "NR ?"; }
The interfaces IltGraphic
and IltGraphicManager
have been deprecated, as well as the IltObject
methods which handle these types. All the methods listed below have been deprecated and replaced since JTGO 3.0 by functionalities provided by the data source and the network component.
IltGraphic getGraphic (IltGraphicManager manager)
void createGraphic (IltGraphicManager manager)
void computeGraphic ()
void computeGraphic (IltGraphicManager manager)
void computeGraphic (IltGraphicManager manager, Object position)
void removeGraphic (IltGraphicManager manager)
void removeGraphic ()
IlvPoint getCenterPoint(IltGraphicManager manager)
void setCenterPoint (IltGraphicManager manager, IlvPoint position)
boolean isVisible (IltGraphicManager manager)
void setVisible (IltGraphicManager manager, boolean visible)
boolean isSelected (IltGraphicManager manager)
void setSelected (IltGraphicManager manager, boolean selected)
boolean isEditable (IltGraphicManager manager)
void setEditable (IltGraphicManager manager, boolean editable)
IlvGraphic getLayoutProxy (IltGraphicManager)
void addGraphicChangedListener (IltGraphicChangedListener listener)
void removeGraphicChangedListener (IltGraphicChangedListener listener)
IltGraphicSettings getGraphicSettings (IltGraphicManager manager)
void setGraphicSettings (IltGraphicManager manager, IltGraphicSettings settings)
void restoreVisibility (IltGraphicManager manager, IltGraphicSettings settings)
void StartDelayingComputeGraphic
void EndDelayingComputeGraphic
void startDelayingComputeGraphic
void endDelayingComputeGraphic
void applyTransform (IltGraphicManager manager, IlvTransformer t)
The interface IlpGraphicHolder
has a new method invalidate()
which invalidates all the graphic instances present in the graphic holder.
The interface IlpGraphicView
has a new method invalidateGraphics
which invalidates the representation of all graphic objects currently displayed by the graphic view. The methods setStyleManager
and getStyleManager
have been deprecated in favor of the CSS mechanism.
The interfaces IlpGraphicComponent
and IlpInteractiveGraphicComponent
have been created. They are implemented by all JTGO graphic components as well as by their web component counterparts.
The method IltGraphicRenderer.customizeGraphic(IltGraphicElementAggregate aggregate)
has been deprecated and replaced by the method IltGraphicRenderer.customizeGraphic(IltGraphicElementAggregate aggregate, IltGraphicRendererContext context)
where:
IltGraphicElementAggregate aggregate
: composite graphic where the new decorations should be added
IltGraphicRendererContext context
: context information used during the renderer process
The Graphic style keys declared in class ilog.cpl.graphic.IlpGraphic
have been replaced by CSS properties. Please refer to chapter Advanced Graphic Objects in the User's Manual for a complete list of properties that can be configured using CSS.
The class ilog.cpl.graphic.IlpGraphicRendererContext
has a new constructor which takes as arguments the graphic view, the representation object and, optionally, the attribute which is being rendered. This class also contains a new method called getPropertyValue
which retrieves the value of a property defined in CSS files set to a given graphic view.
The class ilog.tgo.graphic.IltBaseStyleMapping
has been deprecated. The customization of graphic properties according to states is now achieved through cascading style sheets. See Chapter 18 in the User's Manual for more information.
The methods IltAlarm.SetSeverityMapping
and IltTrap.SetTypeMapping
which take style keys as arguments are now deprecated. The customization of graphic properties according to alarms is now achieved through cascading style sheets. See Chapter 18 in the User's Manual for more information.
The method IlpAbstractHierarchyAdapter.setGraphicViewStyleManager
has been deprecated. A new method setGraphicView
should be used instead.
The Style API has been deprecated in favor of the Cascading Style Sheet mechanism. All style keys declared in IlpAttribute
, IlpObject
, IlpGraphic
, IltObject
and all its subclasses, have been replaced by CSS properties with the same functionality.
The functionality offered by the style value providers and style value modifiers is made available through CSS functions. Please refer to chapter Introducing Cascading Style Sheets in the User's Manual for more information.
A new class ilog.cpl.service.IlpOrderedValueMap
has been created. It allows you to define value maps in CSS, and use them to customize the representation of your business objects.
The method IlpContext.getStyleManager
has been deprecated, as the loading of style modules in the deployment descriptor has been deprecated. You can now load CSS files directly in the specific graphic components using the method setStyleSheets
.
The classes ilog.cpl.storage.IlpJDOMStyleReader
and IlpJDOMStyleWriter
have been deprecated in favor of the CSS mechanism.
The method IlpTypeConverter.getIlpKey
has been deprecated. The class IlpDefaultTypeConverter
has been changed so that, when a certain type is not handled internally, it uses the PropertyEditor
(see java.beans.PropertyEditor
) of the target class to do the conversion.
The methods IlpGeographicPolyline.getPosition
and IlpGeographicPolyline.getPositions
have been deprecated and should be replaced by IlpGeographicPolyline.getPoint
and IlpGeographicPolyline.getPoints
respectively.
The method IlpEmptyTableSelectionModel.fireSelectionChange()
has been deprecated and is replaced by IlpEmptyTableSelectionModel.fireSelectionChange(Collection c)
.
The new classes ilog.cpl.util.text.IlpDecimalFormat
, ilog.cpl.util.text.IlpMessageFormat
and ilog.cpl.util.text.IlpSimpleDateFormat
allow you to specify formats that can be used in cascading style sheets, as illustrated by the following code:
#labelDateFormat { class: 'ilog.cpl.util.text.IlpSimpleDateFormat'; pattern: "HH:mm:ss z"; }
Copyright © Rogue Wave Software, Inc. 1997, 2016. All rights reserved. Legal terms. | PREVIOUS NEXT |