|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--jdraw.graphics.GraphicObject
|
+--jdraw.graphics.PolylineObject
Class PolylineObject is the GraphicObject extension which holds a multi-line shape.
| Fields inherited from class jdraw.graphics.GraphicObject |
arrowsOn, backgroundColor, color, controlPoints, graphicType, paint, shape, stroke |
| Constructor Summary | |
PolylineObject(java.awt.Color c,
java.awt.Color bgc,
java.util.Vector p,
java.util.Vector cPoints,
java.awt.BasicStroke bs,
int arrows)
Construct this with the given Colors, FillStyle, and ControlPoints objects. |
|
PolylineObject(java.awt.Point pt1,
java.awt.Color c,
java.awt.Color bgc,
java.util.Vector p,
java.awt.BasicStroke bs,
int arrows)
Construct this with the given Point, Colors, FillStyle, and ControlPoints objects. |
|
| Method Summary | |
void |
addPoint(java.awt.Point clickedPoint)
Adds the passed in Point object to the points in this.shape. |
java.lang.Object |
clone()
returns - A copy of this. |
void |
draw(java.awt.Graphics2D g2D,
float zoom)
Draws this.shape on the given Graphics2D object. |
java.util.Vector |
getSaveBundle()
Returns a saveBundle (Vector) derived from the information contained in this. |
boolean |
isPointOnShape(java.awt.Point clickedPoint)
Returns a boolean value representing whether the given Point resides on this.shape. |
void |
setArrows(int arrows)
Empty method which is overwritten in Line, Polyline, and Curve. |
void |
setControlPoints()
Sets this.controlPoints based on the current PathIterator of this.shape. |
void |
setLastPoint(java.awt.Point dragPoint)
Method setLastPoint is overwritten in PolygonObject, PolylineObject, CurveObject, and CurvedShapeObject. |
void |
setShape()
Sets this.shape based on the points currently in this.controlPoints. |
| Methods inherited from class jdraw.graphics.GraphicObject |
containedIn, deriveImage, flipHorizontally, flipVertically, getBackgroundColor, getColor, getControlPoints, getGraphicType, getMaxX, getMaxY, getMinX, getMinY, getShape, getStroke, getTouchedControlPoint, rotate, setBackgroundColor, setColor, setHorizontalCenter, setMaxX, setMaxY, setMinX, setMinY, setPaint, setSecondPoint, setStroke, setVerticalCenter, translate, translateControlPoint |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PolylineObject(java.awt.Color c,
java.awt.Color bgc,
java.util.Vector p,
java.util.Vector cPoints,
java.awt.BasicStroke bs,
int arrows)
c - - The Color object to store in this.color.bgc - - The Color object to store in this.backgroundColor.p - - The Vector to store in this.paint.cPoints - - Vector object to store in this.controlPoints.bs - - The BasicStroke object to store in this.stroke.arrows - - The int value indicating which (if any) arrow heads
to draw.
public PolylineObject(java.awt.Point pt1,
java.awt.Color c,
java.awt.Color bgc,
java.util.Vector p,
java.awt.BasicStroke bs,
int arrows)
pt1 - - The Point object at which to start the GeneralPath.c - - The Color object to store in this.color.bgc - - The Color object to store in this.backgroundColor.p - - The Vector to store in this.paint.bs - - The BasicStroke object to store in this.stroke.arrows - - The int value indicating which (if any) arrow heads
to draw.| Method Detail |
public java.lang.Object clone()
clone in class GraphicObjectpublic void setLastPoint(java.awt.Point dragPoint)
GraphicObjectsetLastPoint in class GraphicObjectdragPoint - - The Point object to store as the last of this.shape.public void addPoint(java.awt.Point clickedPoint)
addPoint in class GraphicObjectclickedPoint - - The Point object to add to this.shape.public boolean isPointOnShape(java.awt.Point clickedPoint)
isPointOnShape in class GraphicObjectclickedPoint - - The Point object represent the position of a mouse click.
public void draw(java.awt.Graphics2D g2D,
float zoom)
draw in class GraphicObjectg2D - - The Graphics2D object on which to draw this.shape.public void setShape()
setShape in class GraphicObjectpublic void setControlPoints()
setControlPoints in class GraphicObjectpublic java.util.Vector getSaveBundle()
getSaveBundle in class GraphicObjectpublic void setArrows(int arrows)
GraphicObjectsetArrows in class GraphicObjectarrows - - The int value to be copied to this.arrowsOn.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||