To use Rogue Wave® JViews effectively, you need to understand how
to use Rogue Wave JViews
Framework, and to use the Framework, you need to understand the
basic object model, that is, the core Java™
objects and their relationships with each other.
The Framework object model
A basic graphics application needs just a
few parts:
- Graphic objects (manipulated with resize, select, and draw functions)
- A data structure to put them into
- A viewport (typically a rectangular area in a window on the display) which allows zooming in and out on the graphic objects that are drawn in it
In the Rogue Wave JViews world, these parts are formally referred
to as IlvGraphic, IlvManager, and IlvManagerView objects, respectively. Their
organization is shown in the following figure.
![Diagram
showing the organization of a basic graphics application. Object instances
in this diagram are represented as stacked cards in the form of shaded
rectangles. Viewport instances of the IlvManagerView class display
DataStructure instances of the IlvManager class which contain Graphic
Object instances of the IlvGraphic class.](../../JViews_Framework/usressfwork/_media/Fig1-2online_default.gif)
Basic Rogue Wave JViews Classes
The following figure shows the same
classes represented as a UML class diagram.
![UML class
diagram of the basic classes in a typical graphics application. Any
number of IlvMangerView instances are composed from an instance of
IlvManager. IlvManager is the base class for IlvGraphic and depends
on the IlvGraphicBag interface. IlvManager is composed of zero or
more IlvGraphic objects. All these classes are in the ilog.views package,
but IlvManagerView extends Component from the java.awt package.](../../JViews_Framework/usressfwork/_media/fwess_manager1_default.png)
Basic Classes: UML Class Diagram
The graphic object: IlvGraphic
An IlvGraphic graphic object typically
represents some custom entity in the end-user’s application
domain. For example, in a geographic display for a telecom
network, there may be lines, labels, and polygons that form the
background map and some other more sophisticated objects that
represent the telecom devices in the network.
The graphics framework comes with a large set of predefined
graphic objects, such as rectangles, polylines, polygons,
splines, and labels. Other domain-specific objects (such as the
network devices in the above example) can be created by
subclassing one of these objects or the base class object,
IlvGraphic
, or by grouping predefined objects together.
The data structure: IlvManager
The IlvManager data structure is a container
for graphic objects, therefore it is the most important object of
the Framework. The manager organizes graphic objects into several
layers; graphic objects contained in a higher level layer are
displayed in front of objects located in a lower layer.
The manager also provides the means to select the graphic
objects. The library comes with several predefined ways to
display a selected graphic object; you can subclass
IlvManager
to create your own user-defined display methods.
The viewport: IlvManagerView
An IlvManagerView viewport is designed to
visualize the graphic objects of a manager. The class IlvManagerView is a component (subclass
of the java.awt.Componentclass)
that you use in your AWT or Swing application to visualize the
manager. A manager view lets you define which layer of the
manager is visible for a view. In addition, you may use several
manager views to visualize different areas of the manager. You
can zoom and pan the content of the view.