Package org.omegahat.Graphics.Primitives

Classes defining graphical objects in general, plus particular primitive objects, and related drawing primitives.

See:
          Description

Interface Summary
AllocatorRegionDescriptionInt A potentially symbolic description of a region that adds the notion of being owned or generateis owned or generated by a RegionAllocator.
GraphicalComponentInt General abstraction of a graphical component that can be added to a plot as an element in the hierarchy.
GraphicalContainerInt An interface defining a graphical object that can contain child elements.
NodeMap Interface defining methods used when recursively operating on the elements in a graphical hierarchy.
Origin Constants to represent the choice of origin in plotting an object.
Region General interface defining a shape or region on a device, without containing any information about the nature of that shape - 2 or 3D, rectangular or general, etc.
RegionDescriptionInt A potentially symbolic description of a Region's shape, that is location and dimension.
ScaledComponentInt An object that supports both X and Y ScaleInts for mapping entries between native and other coordinate systems (device NDC).
ScaleInt Interface abstraction of the Scale class providing a mapping into a coordinate system.
SimpleGraphicalContainerInt A basic interface defining a container used as the parent of GraphicalComponentInts which is used as the basis for GraphicaContainerInt and implemented by OutputDevice to allow it to be used as a parent of an arbitrary component.
 

Class Summary
DynamicGraphicalContainer Extension of basic graphical container that caches its current dimensions when it is drawn so that it can draw any of its children individually without redrawing itself.
FillOvalPrimitive Rectangular graphical objects containing a fill-able oval.
FillRectPrimitive Fill-able rectangular graphical objects.
GraphicalContainer Graphical objects that can contain other graphical objects.
GraphicalElement Graphical objects that can contain other graphical objects.
GraphicalObject The class from which all graphical objects must inherit.
IconPrimitive General Swing-style icons as rectangular graphical objects.
InterpretedUDouble Version of UDouble that allows it to be used with operator overloading in Omegahat, but that allows the same methods to be called explicitly in Java without requiring the entire Omegahat distribution.
Justification Constants for vertical and horizontal justification of rendered graphical objects.
LineDash Objects to represent line dash patterns in the Java 2D style.
LinePrimitive Single line segment as a rectangular graphics object.
OvalPrimitive Rectangular graphical object drawn as an oval.
PolygonPrimitive A class for representing polygons of an arbitray number of vertices.
PolylinePrimitive A class for representing (unclosed) lines of an arbitray number of line segments.
PolypointPrimitive Class extended by specific classes for plotting objects that derive from arrays of x and y co-ordinates.
RectPrimitive Rectangular box as a graphical object.
RectRegion Used as the result of the computation of a symbolic RecRegionDescription and returns the location and size of that description in the parents normalized coordinates (NPC).
RectRegionDescription Class the provides a symbolic description of a rectangular region area for different coordinate systems, etc.
RegionDescription Trivial class defining a symbolic description (i.e.
RGO An abstract class for Rectangular Graphical Objects (RGO) which provides a symbolic description of the rectanglular region iin which it is located.
Scale A scale (e.g., for an axis), defined by a minimum and maximum value.
StringIcon A string used as an icon, for graphics.
TextPrimitive String as a rectangular graphical object.
UDouble Double values with an associated unit, used in specifying RegionDescriptionInts.
UDoubleExpression An initial version of a symbolic UDouble which supports addition and subtraction and which can be used with nested elemetns to provide multiplication and division.
Unit Units in which lengths can be specified.
 

Exception Summary
DrawChildException Exception thrown when an error or exception occurs in drawing an element in a GraphicalContainer object.
 

Package org.omegahat.Graphics.Primitives Description

Classes defining graphical objects in general, plus particular primitive objects, and related drawing primitives.

The class GraphicalObject is the base for all such objects; it is extended by rectangular graphical objects, with an (x, y) orgin, width, and height; this in turn is extended by GraphicalElement, which is a higher-level collection of objects that can contain other graphical objects recursively.

The various primitives correspond to drawing primitives in Java (lines, rectangles, ovals, polylines, etc.), plus a few additional primitives useful for statistical plots (icons and their specialization, for example). For each of these classes there will likely be several constructors plus one main method, draw. This method is not likely to be called directly from user code, except by another draw method. When writing a new graphics primitive class to extend the scope of the system, you need to implement this method. Following the source for a similar existing class will usually be fairly straightforward.

The constructors may involve a units argument, allowing the caller to specify the units in which the primitive object's co-ordinates are interpreted. See the class Units or the general description for the available units.