|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
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()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |