skip to main content
Defense > Programmer's documentation > Essential Features > Introducing Rogue Wave JViews Framework > A basic graphics application model
 
A basic graphics application model
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.
Basic Rogue Wave JViews Classes
The following figure shows the same classes represented as a UML class diagram.
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.

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.