Interface Graphic

All Known Subinterfaces:
AxisBound3Boundable, AxisLayoutGraphic, BoundableGraphic, ControllableGraphic, DisplaySpace, GraphicGeometry, GraphicPresence, GraphicResource, GraphicShape, GraphicSpace, GraphicSpaceRoot, GraphicView, InteractableGraphic, IntersectableGraphic, IntersectionNode, KinkableGraphic, LabelGraphic, LinkableGraphic, LinkingGraphic, MatrixTransformNode, PickEngine, RigidTransformNode, RotationNode, ScaleNode, ScreenSpace, SelectableGraphic, SelectableShape, SpaceMapper, SpaceNode, TransformableGraphic, TransformNode, TranslationNode, ViewSpace, WorldSpace
All Known Implementing Classes:
AbstractDisplaySpace, AbstractGraphicSpaceRoot, AbstractIntersectionNode, AbstractLabelGraphic, AbstractPickEngine, AbstractScreenSpace, AbstractSpaceMapper, AbstractSpaceNode, AbstractViewSpace, AbstractWorldSpace, AxisAngle3, AxisBound3, Bound3, ClientLabelGraphic, Line3, Matrix4, NullGraphicView, Plane3, Point3, SwingDataProxy, SwingDataShape, SwingGraphEdge, SwingGraphVertex, SwingGraphView, SwingListView, SwingShape, SwingSpaceMapper, SwingSpaceNode, SwingTreeView, Tuple3, Vector3

public interface Graphic

The base interface for all graphic entities and capabilities that Gumbo uses in a graphic system neutral way. This interface serves as a proxy for a target graphic object, such as a native graphic object. In the case of self-proxy, the proxy target will be this object, the proxy. Such access to the proxy target allows cooperating implementations to take advantage of native capabilities, such as for spatial transformation. This interface does not extend Delegatable since it is intended as a proxy for the target graphic (many to one), not a delegate of it (one to one). Subclasses, however, are free to implement Delegatable as needed.

Graphic interfaces can be implemented as "non-native", by Gumbo or the client, or as "native", by a native graphic system (Swing, JOGL, Java 3D, etc.). Native implementations can be "direct", with a given native object directly implementing one or more graphic interfaces, or they can be "indirect", with one or more adapters implementing the graphic interfaces and forwarding to a given native object.

Typically, graphic interfaces are combined. For example, a displayable native graphic shape may implement GraphicResource, GraphicPresence, and several other graphic capability interfaces. As such, graphic interface methods must be reasonably distinct from native graphic methods and each other's methods. The convention for method naming is to include "Graphic" as well as a distinguishing part of the interface name. For example, the IntersectableGraphic interface has methods named "canIntersectGraphic()" and "intersectGraphic()".

Not all graphic-related entities used by Gumbo have to implement the Graphic interface. Gumbo can use graphic objects, as-is, in situations involving adapter and strategy patterns (such as a JComponent shape wrapper and a Java 3D picking engine, respectively) that mediate between Gumbo and the native objects. Within Gumbo, such adapter and strategy classes will implement Graphic as a reminder that it is related to graphics and to conform to Graphic naming conventions.

$Revision: 1.9 $
Jon Barrilleaux ( of JMB and Associates Inc.

Method Summary
 java.lang.Object getGraphic()
          Returns the target graphic object represented by this proxy interface, which may be needed to take advantage of native graphic capabilities.

Method Detail


public java.lang.Object getGraphic()
Returns the target graphic object represented by this proxy interface, which may be needed to take advantage of native graphic capabilities.

The target graphic object. Possibly this object (self-proxy, direct implementation), but never null.