jdraw.graphics
Class EllipseObject

java.lang.Object
  |
  +--jdraw.graphics.GraphicObject
        |
        +--jdraw.graphics.EllipseObject
All Implemented Interfaces:
java.io.Serializable

public class EllipseObject
extends GraphicObject

Class EllipseObject is the GraphicObject extension which holds an ellipse shape.

See Also:
Serialized Form

Field Summary
protected  java.awt.Point firstPoint
          Need to save a reference to the first point selected (for initial drawing purposes).
 
Fields inherited from class jdraw.graphics.GraphicObject
arrowsOn, backgroundColor, color, controlPoints, graphicType, paint, shape, stroke
 
Constructor Summary
EllipseObject(java.awt.Color c, java.awt.Color bgc, java.util.Vector p, java.util.Vector cPoints, java.awt.BasicStroke bs)
          Construct this with the given Shape, Color, FillStyle, and ControlPoints objects.
EllipseObject(java.awt.Point pt1, java.awt.Point pt2, java.awt.Color c, java.awt.Color bgc, java.util.Vector p, java.awt.BasicStroke bs)
          Construct this with the given Points, Colors, FillStyle, BasicStroke objects.
 
Method Summary
 java.lang.Object clone()
          Method clone() is overwritten by each individual ShapeObject class.
 void setControlPoints()
          Sets this.controlPoints based on the current PathIterator of this.shape.
 void setSecondPoint(java.awt.Point pt2)
          Sets the opposite corner of the Shape from firstPoint.
 void setShape()
          Sets this.shape based on the points currently in this.controlPoints.
 void translateControlPoint(int a, int b, int c)
          translateControlPoint(int, int, int) is disabled for an EllipseObject.
 
Methods inherited from class jdraw.graphics.GraphicObject
addPoint, containedIn, deriveImage, draw, flipHorizontally, flipVertically, getBackgroundColor, getColor, getControlPoints, getGraphicType, getMaxX, getMaxY, getMinX, getMinY, getSaveBundle, getShape, getStroke, getTouchedControlPoint, isPointOnShape, rotate, setArrows, setBackgroundColor, setColor, setHorizontalCenter, setLastPoint, setMaxX, setMaxY, setMinX, setMinY, setPaint, setStroke, setVerticalCenter, translate, translateControlPoint
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

firstPoint

protected java.awt.Point firstPoint
Need to save a reference to the first point selected (for initial drawing purposes).
Constructor Detail

EllipseObject

public EllipseObject(java.awt.Color c,
                     java.awt.Color bgc,
                     java.util.Vector p,
                     java.util.Vector cPoints,
                     java.awt.BasicStroke bs)
Construct this with the given Shape, Color, FillStyle, and ControlPoints objects.
Parameters:
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.

EllipseObject

public EllipseObject(java.awt.Point pt1,
                     java.awt.Point pt2,
                     java.awt.Color c,
                     java.awt.Color bgc,
                     java.util.Vector p,
                     java.awt.BasicStroke bs)
Construct this with the given Points, Colors, FillStyle, BasicStroke objects.
Parameters:
pt1 - - The Point object at which to start the GeneralPath.
pt2 - - The Point object at the opposite corner of the shape from pt1
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.
Method Detail

clone

public java.lang.Object clone()
Description copied from class: GraphicObject
Method clone() is overwritten by each individual ShapeObject class.
Overrides:
clone in class GraphicObject
Returns:
- a copy of this.

setSecondPoint

public void setSecondPoint(java.awt.Point pt2)
Sets the opposite corner of the Shape from firstPoint.
Overrides:
setSecondPoint in class GraphicObject
Parameters:
pt2 - - The Point object used with firstPoint to build this.shape.

setShape

public void setShape()
Sets this.shape based on the points currently in this.controlPoints.
Overrides:
setShape in class GraphicObject

setControlPoints

public void setControlPoints()
Sets this.controlPoints based on the current PathIterator of this.shape.
Overrides:
setControlPoints in class GraphicObject

translateControlPoint

public void translateControlPoint(int a,
                                  int b,
                                  int c)
translateControlPoint(int, int, int) is disabled for an EllipseObject.