The view

The view displays a rectangular area of a theoretically infinite plane area. The view performs the following functions:
  • Displays a subset of the objects of the model
  • Allows navigation using scrollbars and provides a zoom facility
  • Assigns default positions to nodes that have no value for position in the model
  • Assigns shapes to links that have none
  • Modifies link shapes when end nodes are moved
  • Provides a toolbar for choosing a view interactor
  • Optionally displays an overview window

Classes of the network view

The IlpNetwork class automatically creates the concrete class IlpNetworkView, which is provided for developing the network view. This class provides methods that allow you to configure the view in the following ways:
For convenience, these methods are also accessible from the class IlpNetwork. They delegate to IlpNetworkView.
For information on how to configure the network view in CSS, see Configuring a network component through a CSS file .
For information on how to configure the network view through the API, see How to configure the network view with the API .

Graphic objects in the network component

Graphic objects display as many details as possible within the limits of the display area and without loss of readability.
The network component uses only composite graphic objects. The graphic objects are created by the view renderer, which calls the appropriate object renderers to obtain the composite graphic objects. The view determines which object renderer is required to draw the graphic object that translates a particular representation object or attribute from the style sheet properties.
The following basic variations of graphic object exist in the network component:
  • Nodes—Nodes are the basic graphic objects and they are represented as network elements according to the conventions of the governing standards, such as ITU-T or ANSI, and the appropriate protocols.
  • Links—Links are the connections between nodes.
End-user interaction with a graphic object is handled by an object interactor. Object interactors handle the gestures of an end user when performing a task. Gestures consist of one or more mouse events to perform one task.
For more information on object interactors, see Object interactors.

Graphic object classes

The graphic representation of each object displayed in the network component is implemented through the IlpGraphic interface. JViews TGO provides predefined network graphic objects that are produced by the default network component renderer. You can customize the rendering of the objects through CSS.
For custom business objects, JViews TGO provides a default representation with a set of properties that can be customized to better represent your objects. If you prefer, you can also specify a new graphic representation by defining an IlvGraphic class in the CSS. For more information, refer to Customizing user-defined business objects. You can also refer to <installDir> /samples/network/compositeGraphic to see how to create a new object representation by using the Rogue Wave® JViews composite graphics feature.
Predefined business objects already have a specific graphic representation that can only be changed through CSS customization by setting the object properties.
You can customize the graphic representation by adding new decorations. To see how to add new decorations to the objects using CSS, look at the decoration sample at <installDir> /samples/network/decoration.

Network graphic object renderers

Object renderers in the network component create one graphic object that translates a complete representation object. No graphic objects are created that correspond to attributes of a representation object. Instead, subcomponents of graphic objects are created from attributes for example, a label can be created from the name attribute.
Such subcomponents are combined into composite graphic objects, like the link with secondary states and a label shown in Link with secondary states and a label by using attachments.
linksample001.gif
Link with secondary states and a label
A composite graphic object constructed in this way looks like one object. The different instances of IlpGraphic used to build the graphic object cannot be distinguished as separate objects in the network. JViews TGO manages only the composite object. You cannot move the label separately from the link.