|
Jazz API Documentation | |||||||||
| 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.ZShape
ZShape is a graphic object that represents a pre-defined java.awt.Shape
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.
| Field Summary | |
static boolean |
absPenWidth_DEFAULT
|
static java.awt.Color |
fillColor_DEFAULT
|
static java.awt.Color |
penColor_DEFAULT
|
static double |
penWidth_DEFAULT
|
| Fields inherited from class edu.umd.cs.jazz.ZSceneGraphObject |
bounds,
volatileBounds,
volatileBounds_DEFAULT |
| Constructor Summary | |
ZShape()
Constructs a new visual component based on a java.awt.Shape |
|
ZShape(java.awt.Shape shape)
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. |
protected void |
computeFlattenedShape()
Recompute the points of a flattened version of the current shape. |
protected java.lang.Object |
duplicateObject()
Returns a clone of this object. |
double |
getAbsPenWidth()
Get the absolute width of the pen used to draw the perimeter of this shape. |
java.awt.Color |
getFillColor()
Get the fill color of this shape. |
java.awt.Color |
getPenColor()
Get the pen color of this shape. |
double |
getPenWidth()
Get the width of the pen used to draw the perimeter of this shape. |
java.awt.Shape |
getShape()
Return the current shape. |
java.awt.Stroke |
getStroke()
Get the stroke used to draw the visual component. |
boolean |
pick(java.awt.geom.Rectangle2D rect,
ZSceneGraphPath path)
Returns true if the specified rectangle is on the polygon. |
void |
render(ZRenderContext renderContext)
Paints this object. |
void |
setAbsPenWidth(double width)
Set the absolute width of the pen used to draw the perimeter of this shape. |
void |
setFillColor(java.awt.Color color)
Set the fill color of this shape. |
void |
setPenColor(java.awt.Color color)
Set the pen color of this shape. |
void |
setPenWidth(double width)
Set the width of the pen used to draw the perimeter of this shape. |
void |
setShape(java.awt.Shape aShape)
Set the current shape. |
void |
setState(java.lang.String fieldType,
java.lang.String fieldName,
java.lang.Object fieldValue)
Set some state of this object as it gets read back in. |
void |
setStroke(java.awt.Stroke stroke)
Set the stroke used to draw the visual component. |
void |
writeObject(ZObjectOutputStream out)
Write out all of this object's state. |
| Methods inherited from class edu.umd.cs.jazz.ZVisualComponent |
addParent,
getParents,
getRoot,
paint,
pickBounds,
removeParent,
repaint,
repaint,
trimToSize,
updateBounds,
updateObjectReferences,
updateParentBounds,
updateVolatility,
writeObjectRecurse |
| Methods inherited from class edu.umd.cs.jazz.ZSceneGraphObject |
clone,
dump,
getBounds,
getBoundsReference,
getVolatileBounds,
reshape,
setBounds,
setVolatileBounds |
| Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
public static final java.awt.Color penColor_DEFAULT
public static final java.awt.Color fillColor_DEFAULT
public static final double penWidth_DEFAULT
public static final boolean absPenWidth_DEFAULT
| Constructor Detail |
public ZShape()
aShape - a pre-defined shape.public ZShape(java.awt.Shape shape)
aShape - a pre-defined shape.| Method Detail |
protected java.lang.Object duplicateObject()
ZSceneGraphObject.duplicateObject()public java.awt.Shape getShape()
public void setShape(java.awt.Shape aShape)
aShape - a new shape.protected void computeFlattenedShape()
public double getPenWidth()
public void setPenWidth(double width)
width - the pen width.public void setAbsPenWidth(double width)
width - the pen width.public double getAbsPenWidth()
getPenWidth()public java.awt.Stroke getStroke()
public void setStroke(java.awt.Stroke stroke)
stroke - the stroke.public java.awt.Color getPenColor()
public void setPenColor(java.awt.Color color)
color - the pen color, or null if none.public java.awt.Color getFillColor()
public void setFillColor(java.awt.Color color)
color - the fill color, or null if none.
public boolean pick(java.awt.geom.Rectangle2D rect,
ZSceneGraphPath path)
rect - Pick rectangle of object coordinates.path - The path through the scenegraph to the picked node. Modified by this call.ZDrawingSurface.pick(int, int)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.
renderContext - The graphics context to paint into.protected void computeBounds()
updateBounds when needed.
public void writeObject(ZObjectOutputStream out)
throws java.io.IOException
out - The stream that this object writes into
public void setState(java.lang.String fieldType,
java.lang.String fieldName,
java.lang.Object fieldValue)
fieldType - The fully qualified type of the fieldfieldName - The name of the fieldfieldValue - The value of the field
|
Jazz API Documentation | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||