The graphic view
Describes the graphic view, a container for graphic objects to which it provides access.
Introduces the graphic view.
Discusses graphic objects, which are screen representations of business objects and their representation objects.
Describes graphic holders, which store the graphic objects created for a given graphic view.
Provides links to information on customizing the representation of objects in the different graphic components.
Introduction
The graphic view is a container for graphic objects to which it provides access. It is the physical space on the screen where these objects are drawn. In addition to storing the graphic objects created to represent the application data, the graphic view contains configuration and rendering information that is used to translate representation objects into graphic objects.
A graphic view is defined by the
IlpGraphicView interface. This interface provides methods to:
Graphic objects
Business objects and their representation objects are graphically represented on the screen by means of graphic objects. Graphic objects make it possible for you to create sophisticated, high-quality graphic representations in a flexible way.
Graphic objects are always associated with a representation object and optionally with a representation object attribute. They are created for a specific graphic view and according to the configuration defined for that view.
Graphic object classes can be associated with default graphic settings that can be overwritten at the level of the graphic object instance. These graphic settings are stored as properties which are configured using cascading style sheets. For detailed information, see
Introducing cascading style sheets.
The graphic view renderer is responsible for creating the final graphic representation for an object in a certain graphic view. See
Graphic view configuration.
The preferred way to create and customize your graphic objects is using cascading style sheets (CSS). Using CSS, you can define
IlvGraphic or
JComponent objects to draw your representation objects according to the business model information. You can create simple representations such as labels, buttons and icons; or you can create sophisticated graphic objects that are composed of several objects using composite graphics. (See
IlvComponentGraphic for more information.)
Rogue Wave® JViews provides a set of convenience graphic objects that you can use directly when defining complex graphic representations:
Simple graphic objects: label, icon
Composite graphic objects: different balloons, stackers
Graphic object classes
JViews TGO provides all the necessary infrastructure for you to create applications that integrate both predefined business objects and custom business objects.
So that these business objects can be represented virtually in any type of graphic component (whether network, equipment, table, or tree), they are translated into representation objects specific to the graphic component in which they are to be displayed and then converted to graphic objects, ready to draw on the screen.
These graphic objects are defined by the interface
IlpGraphic and can be either simple objects or composite ones. Simple graphics, also known as leaf graphics, are made up of a single graphic element, such as a label or an icon. Composite graphics consist of multiple graphic objects, which are grouped together by means of attachment rules.
JViews TGO supplies the following classes to help you create graphic objects and customize them:
IlpGraphic is an interface that defines all the graphic objects.
IlpAbstractGraphic is a basic implementation for graphic objects. This abstract class contains the basic information that allows you to create your own graphic object classes, if needed.
IlpLeafGraphic is a concrete graphic object implementation that is used to create simple graphic objects, such as labels or icons.
Graphic holders
A graphic holder is defined by the interface IlpGraphicHolder. It is responsible for storing the graphic objects created for a given graphic view. Note that in simple cases where graphic objects can be recreated when needed, it may not be necessary to store them in a graphic holder.
When creating a graphic view, you can use one of the following convenience implementations of
IlpGraphicHolder.
IlpDefaultGraphicHolder. This default implementation stores graphic objects per representation object and attribute.
IlpEmptyGraphicHolder. This simple implementation is used when graphic object instances do not need to be stored in the graphic view.
Graphic view configuration
JViews TGO provides support to customize the graphic representation of the objects in the different graphic components, and of the graphic components themselves by means of cascading style sheets (CSS). For details, refer to:
You can load the CSS file in the graphic view using the method
setStyleSheets. The CSS is dynamically interpreted, which means that there is no need to rerun the application after changes. Once your style sheets are set, all objects currently visible in the graphic view are redecorated accordingly. For details, see
Introducing cascading style sheets.
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.