Graphic Components > Network Component > Network Component Services > Zooming

JViews TGO supports three different zooming modes, as described below:

To summarize, physical zoom provides a fast miniaturized view of a network, whereas logical zoom keeps the graphical quality of the displayed objects.

Zoom support is implemented by the IlpZoomPolicy instances. By default, an IlpNetworkView instance has the physical zoom support set. However, the user can modify this configuration through the methods:

The Two Coordinate Systems

This section assumes that you are familiar with the ILOG JViews class IlvTransformer and with the difference between manager coordinates and view coordinates (see the method getTransformer in the class IlvManagerView).

Because of the possibility of a logical zoom (where the coordinates of the objects are changed according to the zoom level), there are two coordinate systems in use in JViews TGO:

Depending on the method you use, it may be necessary to convert from one coordinate system to another.

To convert from stationary coordinates to view coordinates, apply network.getManagerView().getTransformer(). This rule holds good only for objects in the top-level network. It cannot be applied to subnetworks.

To convert back, apply the inverse transformer. (See the methods inverse and computeInverse in the class IlvTransformer.)

Physical Zoom

Graphic representations of telecom objects make intensive use of labels and icons. Therefore, some graphic objects cannot be resized without deteriorating their aspect when the physical zoom mechanism is used. This effect is even more visible when unzooming. While some JViews TGO objects, like groups, can be resized, other objects, such as network elements, have been intentionally designed to have an optimal size depending on the quantity of information they hold. Resizing these objects impairs the readability and compactness of their graphic representation.

For these reasons, the physical zoom mode was implemented to hide the decorations of telecom objects according to a certain configurable zoom factor. This factor is called the visibility threshold and represents the absolute value of the determinant of the view transformer. When the value of this determinant is lower than the decoration visibility threshold, decorations of the affected type are no longer displayed.

The visibility threshold for each decoration type can be configured locally to a network component through the methods:

or through the CSS properties:

How to Set the Visibility Threshold for Decorations in a Specific Network Component

The following example describes a network component configuration that sets a physical zoom policy to the component, and defines visibility thresholds for the decorations Name, AlarmBalloon, AlarmCount and Plinth. Refer to Configuring a Network Component through a CSS File for more information.

Zooming {
  type: "Physical";
  decorationNames[0]: Name;
  decorationNames[1]: AlarmBalloon;
  decorationNames[2]: AlarmCount;
  decorationNames[3]: Plinth;
  visibilityThresholds[0]: 0.5;
  visibilityThresholds[1]: 0.8;
  visibilityThresholds[2]: 0.5;
  visibilityThresholds[3]: 0.5;
}

Visibility thresholds can also be configured globally for all network components through the methods:

How to Set the Visibility Threshold of Decorations for all Network Components

The following example shows how you can customize the visibility threshold of specific decorations globally, so that all network components created in the application have the same configuration:

IltrZoom.SetVisibilityThreshold (IltGraphicElementName.Name, 0.5);
IltrZoom.SetVisibilityThreshold (IltGraphicElementName.AlarmBalloon, 0.8);
IltrZoom.SetVisibilityThreshold (IltGraphicElementName.AlarmCount, 0.5);
IltrZoom.SetVisibilityThreshold (IltGraphicElementName.Plinth, 0.5);

Logical Zoom

The logical zoom effectively transforms the proportional zoom mechanism of ILOG JViews in such a way that the coordinates of JViews TGO objects in the manager are modified when the zoom factor changes. The effect of this operation is that network elements are not resized and the layout of the links is recalculated to correspond to the new coordinates of the nodes in the manager.

Only the main view of an IlpNetwork can hold the logical zoom support. The overview window always has a physical zoom.

Combining Physical and Logical Zoom (Mixed Zoom)

JViews TGO provides a mechanism that combines the physical and logical zoom policies. This mechanism is implemented by the class IltMixedZoomPolicy and uses physical zoom for zoom factors less than one and logical zoom for zoom factors greater than one, in the same view.

Please note that you can configure the zoom policy in the CSS file through the zooming property. For more information, see The Zooming Rule.