Release Notes > JTGO 3.5 Release Notes > API Changes

This section presents what has changed in JTGO:

Network and Equipment Components

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:

New classes

The following classes have been introduced to allow you to configure the network and equipment components using cascading style sheets:

Deprecated classes

The following classes, which were used to configure the network and equipment components through XML, are now deprecated:

New methods

Deprecated methods

The class IlpNetworkView presents the following changes:

New methods

Deprecated methods

Table Component

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:

New methods

Deprecated methods

The class IlpTableView presents the following changes:

New methods

Deprecated methods

Tree Component

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:

New methods

Deprecated methods

The class IlpTreeView presents the following changes:

New methods

Deprecated methods

Web Components

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:

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:

<jtgo:network name="myNetwork" style="width:500"/>
In JTGO 3.5:
<jtgo:network name="myNetwork">
  <webc:set path="view.width">500</webc:set>
</jtgo:network>

Business Objects

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.

Deprecated methods

Graphic Objects

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:

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.

Adapters

The method IlpAbstractHierarchyAdapter.setGraphicViewStyleManager has been deprecated. A new method setGraphicView should be used instead.

Styles

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.

Context, Deployment Descriptor and Common Services

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.

Miscellaneous

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