|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--edu.umd.cs.jazz.scenegraph.ZVisualComponent
|
+--edu.umd.cs.jazz.component.ZRectangle
ZRectangle is a graphic object that represents a hard-cornered or rounded rectangle.
| Field Summary | |
protected java.awt.Color |
fillColor
|
static java.awt.Color |
fillColor_DEFAULT
|
protected java.awt.Color |
penColor
|
static java.awt.Color |
penColor_DEFAULT
|
protected float |
penWidth
|
static float |
penWidth_DEFAULT
|
protected java.awt.geom.Rectangle2D |
rect
|
| Fields inherited from class edu.umd.cs.jazz.scenegraph.ZVisualComponent |
cacheVolatile,
findable,
findable_DEFAULT,
isVolatile,
localBounds,
localBoundsDirty,
parent,
pickable,
pickable_DEFAULT,
selected |
| Constructor Summary | |
ZRectangle()
Constructs a new Rectangle. |
|
ZRectangle(float x,
float y)
Constructs a new Rectangle. |
|
ZRectangle(float x,
float y,
float width,
float height)
Constructs a new Rectangle. |
|
ZRectangle(java.awt.geom.Rectangle2D r)
Constructs a new Rectangle based on the geometry of the one passed in. |
|
ZRectangle(ZRectangle r)
Constructs a new ZRectangle based on the one passed in (i.e., a "copy constructor"). |
|
| Method Summary | |
java.lang.Object |
clone()
Duplicates the current ZRectangle by using the copy constructor. |
protected void |
computeLocalBounds()
|
java.awt.Color |
getFillColor()
|
float |
getHeight()
Return height of rectangle. |
java.awt.Color |
getPenColor()
|
float |
getPenWidth()
|
java.awt.geom.Rectangle2D |
getRect()
Return rectangle. |
float |
getWidth()
Return width of rectangle. |
float |
getX()
Return x-coord of rectangle. |
float |
getY()
Return y-coord of rectangle. |
void |
paint(ZRenderContext renderContext)
Paints this object. |
boolean |
pick(java.awt.geom.Rectangle2D pickRect)
Determines if the specified rectangle overlaps this rectangle. |
void |
setFillColor(java.awt.Color color)
|
void |
setPenColor(java.awt.Color color)
|
void |
setPenWidth(float width)
|
void |
setRect(float x,
float y,
float width,
float height)
Sets coords of rectangle |
void |
setRect(java.awt.geom.Rectangle2D r)
Sets coords 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.scenegraph.ZVisualComponent |
damage,
damage,
findNode,
findVisualComponent,
getLocalBounds,
getParent,
isFindable,
isPickable,
isSelected,
isVolatile,
pickBounds,
select,
select,
setFindable,
setParent,
setPickable,
setSelected,
setVisualComponent,
setVolatile,
toString,
transformChanged,
unselect,
updateBounds,
updateChildBounds,
updateLocalBounds,
updateVolatility,
writeObjectRecurse |
| Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public static final java.awt.Color penColor_DEFAULT
public static final java.awt.Color fillColor_DEFAULT
public static final float penWidth_DEFAULT
protected java.awt.Color penColor
protected float penWidth
protected java.awt.Color fillColor
protected java.awt.geom.Rectangle2D rect
| Constructor Detail |
public ZRectangle()
public ZRectangle(float x,
float y)
x - X-coord of top-left cornery - Y-coord of top-left corner
public ZRectangle(float x,
float y,
float width,
float 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 frompublic ZRectangle(ZRectangle r)
r - A rectangle to duplicate| Method Detail |
public java.lang.Object clone()
ZRectangle(ZRectangle)public float getPenWidth()
public void setPenWidth(float width)
public java.awt.Color getPenColor()
public void setPenColor(java.awt.Color color)
public java.awt.Color getFillColor()
public void setFillColor(java.awt.Color color)
public boolean pick(java.awt.geom.Rectangle2D pickRect)
pickRect - The rectangle that is picking this rectanglepublic void paint(ZRenderContext renderContext)
g2 - The graphics context to paint into.protected void computeLocalBounds()
public float getX()
public float getY()
public float getWidth()
public float getHeight()
public java.awt.geom.Rectangle2D getRect()
public void setRect(float x,
float y,
float width,
float 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 coordinates
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
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||