Predefined graphic objects
There are various predefined graphic objects.
Arcs
There is one arc object, IlvArc.
An
IlvArc object appears as an outlined, a filled, or a filled and outlined arc of an ellipse. Since JViews 8.0, the
IlvArc object has an annulus thickness. When the annulus thickness is 0.0, the arc has the same behavior as before. When the annulus thickness is grater than 0.0, the arc object becomes an annulus. The arc object has also an
IlvTransformer that allows you to apply transformations to the arc object when its
transformerMode is set to
true.
Ellipses
There is one ellipse object, IlvEllipse.
An
IlvEllipse object appears as an outlined, a filled, or filled and outlined ellipse.
Lines
The line objects are IlvLine and IlvArrowLine.
An
IlvLine object appears as a straight line between two given points.
An
IlvArrowLine object appears as a straight line between two given points, with a small arrowhead drawn at the end of the trajectory.
Rectangles
The rectangle objects are IlvRectangle, IlvReliefRectangle, and IlvShadowRectangle.
An
IlvRectangle object appears as a closed rectangle. It can be outlined, filled, or filled and outlined. You can also set rounded corners on the
IlvRectangle object.
IlvReliefRectangle
An
IlvReliefRectangle object appears as a filled rectangle in relief.
An
IlvShadowRectangle object appears as a rectangle with a shadow underneath.
Polygons and polylines
The class
IlvPolyPoints is an abstract class from which every class having shapes made up of several point coordinates is derived.
An
IlvPolygon object appears as a filled, outlined, or filled and outlined polygon.
An
IlvPolyline object appears as connected segments.
An
IlvArrowPolyline object appears as a polyline and adds one or more arrows to the various lines.
An
IlvSpline object appears as a Bézier spline. It can be either opened or closed, and may also be filled.
Labels and text
The label objects are IlvLabel, IlvReliefLabel, and IlvShadowLabel. The text object is IlvText.
An
IlvLabel object appears as a single line of text. It cannot be zoomed in or reshaped.
IlvLabel supports WYSIWYG text editing.
An
IlvReliefLabel object appears as a relief rectangle holding a single line of text.
An
IlvShadowLabel object appears as an
IlvShadowRectangle with a label.
An
IlvText object appears as a single line of text or several lines of text that can be zoomed and rotated. In multiline mode, the text can be either wrapped or truncated and can be aligned on the leading, center, or trailing position.
IlvText supports WYSIWYG text editing.
An instance of
IlvHTMLText appears as one or more paragraphs of hypertext that could include headlines, lists, tables, different fonts, different colors, and much more.
In-place text editing
Rogue Wave JViews supports WYSIWYG editing for
IlvLabel and
IlvText objects.
A WYSIWYG editable object
This editing behavior is implemented by the
IlvTextSelection and
IlvTextEditor classes. While editing selected text, the user can perform the following actions with the mouse and keyboard:
Click in the text to indicate an insertion point.
Select a zone of text by dragging the mouse over it.
Use the arrow keys to navigate in the selected text.
Combine the Shift and arrow keys to extend the selection zone.
Copy and paste using the Ctrl+C and Ctrl+V keys.
During an edit session you can perform the following move and reshape actions.
Drag the handles to resize a selected
IlvTextobject.
Drag the borders to move a selected
IlvText object.
NOTE >> You cannot perform the following operations:
Edit an
IlvText object in
WRAP_TRUNCATE mode. This is because you cannot see all the text on the screen. Change the object to
WRAP_WORD mode before editing.
Edit an
IlvLabel or an
IlvTextobject that is not editable. Change the attributes of one object to editable using
IlvManager.setEditable(...) before editing.
Markers
The marker object is IlvMarker.
An
IlvMarker object is a nonzoomable object that displays a graphic symbol.
Groups
The group objects are IlvGraphicSet and IlvCompositeGraphic.
An
IlvGraphicSet object is an object that groups graphic objects together.
The class
IlvCompositeGraphic.enables you to associate graphic objects in a single object that features both dynamic and layout functionality. See
Composite Graphics for more information.
Scales
An
IlvRectangularScale object displays a vertical or horizontal scale.
An
IlvCircularScale object displays a circular scale defined by a portion of an ellipse, a starting angle, and an angle range.
Icons
An
IlvIcon object appears as an image.
Paths
IlvGeneralPath objects can display any Java 2D™
Shape objects. This means that they can represent curves, rectangles, ellipses, general paths, and so on., and any combination of them. You can define Java 2D properties for these objects, such as
Paint or
Stroke. The last two objects with the fade-out effect use “gradient paint” objects.
IlvGraphicPath
An
IlvGraphicPath object is a set of polypoints that can be drawn as polylines or as polygons. Depending on the position of its points, a polypoint may either appear as an ordinary polygon or as a hole in another polygon.
Component graphics
An
IlvJComponentGraphic object is a wrapper object that lets you embed a Swing
JComponent in a manager.
An
IlvComponentGraphic object is a wrapper object that lets you embed an AWT Component in a manager.
Use IlvJComponentGraphic and not IlvComponentGraphic to wrap Java Swing components.
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.