|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.umd.cs.jazz.ZSceneGraphObject | +--edu.umd.cs.jazz.ZVisualComponent | +--edu.umd.cs.jazz.component.ZBasicVisualComponent | +--edu.umd.cs.jazz.component.ZShape
ZShape is an abstract object, meant to be extended by visual components that wrap standard java.awt.Shapes.
Warning: Serialized and ZSerialized objects of this class will not be compatible with future Jazz releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Jazz. A future release of Jazz will provide support for long term persistence.
Fields inherited from class edu.umd.cs.jazz.component.ZBasicVisualComponent |
absPenWidth, DEFAULT_ABS_PEN_WIDTH, DEFAULT_FILL_PAINT, DEFAULT_PEN_PAINT, DEFAULT_PEN_WIDTH, DEFAULT_STROKE, fillPaint, penPaint, penWidth, stroke |
Fields inherited from class edu.umd.cs.jazz.ZSceneGraphObject |
bounds, listenerList, volatileBounds, volatileBounds_DEFAULT |
Constructor Summary | |
ZShape()
Constructs a new visual component based on a java.awt.Shape |
Method Summary | |
protected void |
computeBounds()
Notifies this object that it has changed and that it should update its notion of its bounding box. |
java.awt.geom.Rectangle2D |
getFrame()
Return the bounds of the internal java.awt.Shape structure. |
double |
getHeight()
Return the height of this ellipse. |
abstract java.awt.Shape |
getShape()
Return the current shape. |
double |
getWidth()
Return the width of this ellipse. |
double |
getX()
Returns the x coordinate of the upper left corner of the framing rectangle in double precision. |
double |
getY()
Returns the Y coordinate of the upper left corner of the framing rectangle in double precision. |
boolean |
pick(java.awt.geom.Rectangle2D rect,
ZSceneGraphPath path)
Returns true if the specified rectangle is on the polygon. |
protected boolean |
pickStroke(java.awt.geom.Rectangle2D aRect,
double aPenWidth)
Returns true if the specified rectangle intersects the shapes stroke. |
void |
render(ZRenderContext renderContext)
Paints this object. |
Methods inherited from class edu.umd.cs.jazz.component.ZBasicVisualComponent |
duplicateObject, getAbsPenWidth, getFillColor, getFillPaint, getPenColor, getPenPaint, getPenWidth, getPenWidthForCurrentContext, getStroke, setAbsPenWidth, setFillColor, setFillPaint, setPenColor, setPenPaint, setPenWidth, setState, setStroke, writeObject |
Methods inherited from class edu.umd.cs.jazz.ZVisualComponent |
addParent, getNumParents, getParents, getParentsReference, getRoot, paint, pickBounds, removeParent, repaint, repaint, trimToSize, updateBounds, updateObjectReferences, updateParentBounds, updateVolatility, writeObjectRecurse |
Methods inherited from class edu.umd.cs.jazz.ZSceneGraphObject |
addMouseListener, addMouseMotionListener, clone, dump, fireEvent, fireMouseEvent, getBounds, getBoundsReference, getListenerList, getVolatileBounds, hasLisenerOfType, hasMouseListener, processMouseEvent, removeEventListener, removeMouseListener, removeMouseMotionListener, reshape, setBounds, setVolatileBounds |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ZShape()
aShape
- a pre-defined shape.Method Detail |
public abstract java.awt.Shape getShape()
public double getX()
double
precision.public double getY()
double
precision.public double getWidth()
public double getHeight()
public java.awt.geom.Rectangle2D getFrame()
public boolean pick(java.awt.geom.Rectangle2D rect, ZSceneGraphPath path)
pick
in class ZVisualComponent
rect
- Pick rectangle of object coordinates.path
- The path through the scenegraph to the picked node. Modified by this call.ZDrawingSurface.pick(int, int)
protected boolean pickStroke(java.awt.geom.Rectangle2D aRect, double aPenWidth)
rect
- Pick rectangle of object coordinates.aPenWidth
- the current pen width.public void render(ZRenderContext renderContext)
The transform, clip, and composite will be set appropriately when this object is rendered. It is up to this object to restore the transform, clip, and composite of the Graphics2D if this node changes any of them. However, the color, font, and stroke are unspecified by Jazz. This object should set those things if they are used, but they do not need to be restored.
render
in class ZVisualComponent
renderContext
- The graphics context to paint into.protected void computeBounds()
updateBounds
when needed.computeBounds
in class ZSceneGraphObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |