Release Notes > JTGO 4.0 Release Notes > Compatibility Issues > Network Elements

A network element can be displayed in its normal size (expanded) or in a reduced size (collapsed).

Collapsed State

Until JTGO 3.1, network elements were customized with style keys. The following style keys were used:

When the value of IltNetworkElement.IsCollapsed was set to true, the network element was shown in a reduced size, with fewer decorations. There was no space for an alarm count on the base and an alarm balloon would hide secondary state icons.

The value of IltNetworkElement.ExpandOnNewAlarms indicated whether the network element carrying new alarms would automatically expand from its reduced size to its normal size. This effect would attract the operator's attention and leave room to display the alarm account and balloon.

The value of IltNetworkElement.DisplayAlarmCountWhenCollapsed determined whether or not the alarm count displayed in the base would be visible when the graphic representation was in a reduced size.

Since JTGO 3.5, the Style API has been replaced by Cascading Style Sheets. In JTGO 4.0, a network element carrying new alarms can be displayed in a reduced size. When the object is in a reduced size, it is not possible to know which decorations are displayed.

The following CSS extract provides the same features as style keys previously:

object."ilog.tgo.model.IltNetworkElement" {
  collapsed: true;
  alarmCountVisible: true;
  alarmCountAbbreviated: true;
}
 
object."ilog.tgo.model.IltNetworkElement"[newAlarmHighestSeverity] {
  collapsed: false;
  alarmCountVisible: true;
  alarmCountAbbreviated: false;
}

If you cannot immediately migrate to the JTGO 4.0 CSS mechanism, you can still use the JTGO 3.5 Style API. If you do so, make sure you implement the following changes in your code.

Instead of using:

style.setValue(IltNetworkElement.IsCollapsed, Boolean.TRUE);
style.setValue(IltNetworkElement.ExpandOnNewAlarms, Boolean.TRUE);

or

style.setValue(IltNetworkElement.IsCollapsed, Boolean.FALSE);

use the following:

style.setValue(IltNetworkElement.IsCollapsed, new    IltCollapseStyleValueProvider());
style.setValue(IltNetworkElement.ExpandOnNewAlarms, Boolean.TRUE);

This style value provider defines the value of IltNetworkElement.IsCollapsed depending on the value of IltNetworkElement.ExpandOnNewAlarms and on the alarms present in the network element.

Refer to ilog.tgo.graphic.IltCollapseStyleValueProvider for further information.