|
||||||||||
| 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
|
+--edu.umd.cs.jazz.component.ZRectangle
ZRectangle is a graphic object that represents a hard-cornered rectangle.
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 java.awt.Stroke |
DEFAULT_RECT_STROKE
Default stroke for rectangles. |
protected java.awt.geom.Rectangle2D |
rectangle
|
| 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 | |
ZRectangle()
Constructs a new Rectangle. |
|
ZRectangle(double x,
double y)
Constructs a new Rectangle at the specified location, with dimensions of zero. |
|
ZRectangle(double x,
double y,
double width,
double height)
Constructs a new Rectangle at the specified location, with the given dimensions. |
|
ZRectangle(java.awt.geom.Rectangle2D r)
Constructs a new Rectangle based on the geometry of the one passed in. |
|
| Method Summary | |
protected java.lang.Object |
duplicateObject()
Returns a clone of this object. |
java.util.Collection |
getHandles()
Return the collection of handles associated with this object. |
java.awt.geom.Rectangle2D |
getRect()
Return the rectangle. |
java.awt.Shape |
getShape()
Return the shape. |
void |
setPenWidth(double width)
Set the width of the pen used to draw the visual component. |
void |
setRect(double x,
double y,
double width,
double height)
Sets location and size of the rectangle. |
void |
setRect(java.awt.geom.Rectangle2D r)
Sets coordinates of rectangle. |
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 |
writeObject(ZObjectOutputStream out)
Write out all of this object's state. |
| Methods inherited from class edu.umd.cs.jazz.component.ZShape |
computeBounds, getFrame, getHeight, getStrokeTransformForAbsPenWidth, getWidth, getX, getY, pick, pickStroke, render |
| Methods inherited from class edu.umd.cs.jazz.component.ZBasicVisualComponent |
getAbsPenWidth, getFillColor, getFillPaint, getPenColor, getPenPaint, getPenWidth, getPenWidthForCurrentContext, getStroke, setAbsPenWidth, setFillColor, setFillPaint, setPenColor, setPenPaint, setStroke |
| 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 |
addClientProperty, addMouseListener, addMouseMotionListener, clone, dump, fireEvent, fireMouseEvent, getBounds, getBoundsReference, getClientProperty, getListenerList, getVolatileBounds, hasLisenerOfType, hasMouseListener, processMouseEvent, putClientProperty, removeEventListener, removeMouseListener, removeMouseMotionListener, 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.Stroke DEFAULT_RECT_STROKE
protected transient java.awt.geom.Rectangle2D rectangle
| Constructor Detail |
public ZRectangle()
public ZRectangle(double x,
double y)
x - X-coord of top-left cornery - Y-coord of top-left corner
public ZRectangle(double x,
double y,
double width,
double height)
x - X-coord of top-left cornery - Y-coord of top-left cornerwidth - Width of rectangleheight - Height of rectanglepublic ZRectangle(java.awt.geom.Rectangle2D r)
r - A rectangle to get the geometry from| Method Detail |
protected java.lang.Object duplicateObject()
duplicateObject in class ZBasicVisualComponentZSceneGraphObject.duplicateObject()public java.util.Collection getHandles()
ZSceneGraphObjectgetHandles in class ZSceneGraphObjectpublic java.awt.geom.Rectangle2D getRect()
public java.awt.Shape getShape()
getShape in class ZShape
public void setRect(double x,
double y,
double width,
double height)
x - X-coord of top-left cornery - Y-coord of top-left cornerwidth - Width of rectangleheight - Height of rectanglepublic void setRect(java.awt.geom.Rectangle2D r)
r - The new rectangle coordinatespublic void setPenWidth(double width)
setPenWidth in class ZBasicVisualComponentwidth - the pen width.ZBasicVisualComponent.setAbsPenWidth(double)
public void writeObject(ZObjectOutputStream out)
throws java.io.IOException
writeObject in class ZBasicVisualComponentout - The stream that this object writes into
public void setState(java.lang.String fieldType,
java.lang.String fieldName,
java.lang.Object fieldValue)
setState in class ZBasicVisualComponentfieldType - The fully qualified type of the fieldfieldName - The name of the fieldfieldValue - The value of the field
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||