|
||||||||||
| 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
This class is designed to be extended. It takes care of managing a fillPaint, a penPaint, and a stroke, but leaves picking, and rendering to its subclasses.
| Field Summary | |
protected boolean |
absPenWidth
Current absolute pen width. |
static boolean |
DEFAULT_ABS_PEN_WIDTH
Default absolute pen width. |
static java.awt.Paint |
DEFAULT_FILL_PAINT
Default fill paint. |
static java.awt.Paint |
DEFAULT_PEN_PAINT
Default pen paint. |
static double |
DEFAULT_PEN_WIDTH
Default pen width. |
static java.awt.Stroke |
DEFAULT_STROKE
Default stroke. |
protected java.awt.Paint |
fillPaint
Current fill paint. |
protected java.awt.Paint |
penPaint
Current pen paint. |
protected double |
penWidth
Current pen width. |
protected java.awt.BasicStroke |
stroke
Current stroke. |
| Fields inherited from class edu.umd.cs.jazz.ZSceneGraphObject |
bounds, listenerList, volatileBounds, volatileBounds_DEFAULT |
| Constructor Summary | |
ZBasicVisualComponent()
ZBasicVisualComponent constructor comment. |
|
| Method Summary | |
protected java.lang.Object |
duplicateObject()
Returns a clone of this object. |
double |
getAbsPenWidth()
Get the absolute width of the pen used to draw the visual component. |
java.awt.Color |
getFillColor()
Deprecated. As of Jazz version 1.1, replaced by ZFillPaint.getFillPaint(). |
java.awt.Paint |
getFillPaint()
Get the fill paint of this visual component. |
java.awt.Color |
getPenColor()
Deprecated. As of Jazz version 1.1, replaced by ZPenPaint.getPenPaint(). |
java.awt.Paint |
getPenPaint()
Get the pen paint of this visual component. |
double |
getPenWidth()
Get the width of the pen used to draw the visual component. |
protected double |
getPenWidthForCurrentContext()
Get the width of the pen used to draw the visual component while taking the current render context into consideration. |
java.awt.Stroke |
getStroke()
Get the stroke used to draw the visual component. |
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 visual component. |
void |
setFillPaint(java.awt.Paint aPaint)
Set the fill paint of this visual component. |
void |
setPenColor(java.awt.Color color)
Deprecated. As of Jazz version 1.1, replaced by ZPenPaint.setPenPaint(Paint aPaint). |
void |
setPenPaint(java.awt.Paint aPaint)
Set the pen paint of this visual component. |
void |
setPenWidth(double width)
Set the width of the pen used to draw the visual component. |
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, getNumParents, getParents, getParentsReference, getRoot, paint, pick, pickBounds, removeParent, render, repaint, repaint, trimToSize, updateBounds, updateObjectReferences, updateParentBounds, updateVolatility, writeObjectRecurse |
| Methods inherited from class edu.umd.cs.jazz.ZSceneGraphObject |
addMouseListener, addMouseMotionListener, clone, computeBounds, 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 |
| Field Detail |
public static final double DEFAULT_PEN_WIDTH
public static final boolean DEFAULT_ABS_PEN_WIDTH
public static final java.awt.Paint DEFAULT_PEN_PAINT
public static final java.awt.Paint DEFAULT_FILL_PAINT
public static final java.awt.Stroke DEFAULT_STROKE
protected transient java.awt.Paint fillPaint
protected transient java.awt.Paint penPaint
protected transient java.awt.BasicStroke stroke
protected double penWidth
protected boolean absPenWidth
| Constructor Detail |
public ZBasicVisualComponent()
| Method Detail |
protected java.lang.Object duplicateObject()
duplicateObject in class ZVisualComponentZSceneGraphObject.duplicateObject()public double getAbsPenWidth()
getAbsPenWidth in interface ZStrokegetPenWidth()public java.awt.Color getFillColor()
ZFillPaint.getFillPaint().
getFillColor in interface ZFillColorpublic java.awt.Paint getFillPaint()
getFillPaint in interface ZFillPaintpublic java.awt.Color getPenColor()
ZPenPaint.getPenPaint().
getPenColor in interface ZPenColorpublic java.awt.Paint getPenPaint()
getPenPaint in interface ZPenPaintpublic double getPenWidth()
getPenWidth in interface ZStrokegetAbsPenWidth()protected double getPenWidthForCurrentContext()
public java.awt.Stroke getStroke()
getStroke in interface ZStrokepublic void setAbsPenWidth(double width)
setAbsPenWidth in interface ZStrokewidth - the pen width.public void setFillColor(java.awt.Color color)
setFillColor in interface ZFillColorcolor - the fill color, or null if none.public void setFillPaint(java.awt.Paint aPaint)
setFillPaint in interface ZFillPaintaPaint - the fill paint, or null if none.public void setPenColor(java.awt.Color color)
ZPenPaint.setPenPaint(Paint aPaint).
setPenColor in interface ZPenColorcolor - the pen color, or null if none.public void setPenPaint(java.awt.Paint aPaint)
setPenPaint in interface ZPenPaintaPaint - the pen paint, or null if none.public void setPenWidth(double width)
setPenWidth in interface ZStrokewidth - the pen width.setAbsPenWidth(double)public void setStroke(java.awt.Stroke stroke)
setStroke in interface ZStrokestroke - the stroke.
public void setState(java.lang.String fieldType,
java.lang.String fieldName,
java.lang.Object fieldValue)
setState in class ZVisualComponentfieldType - The fully qualified type of the fieldfieldName - The name of the fieldfieldValue - The value of the field
public void writeObject(ZObjectOutputStream out)
throws java.io.IOException
writeObject in class ZVisualComponentout - The stream that this object writes into
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||