|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Point2DList
public class Point2DList
Maintains an open locus of Point2D objects intended to be manipulated by Transform2D objects
Constructor Summary | |
---|---|
Point2DList()
Only constructor leaves the instance field as an empty ArrayList of points |
Method Summary | |
---|---|
void |
addPoint(Point2D p)
Modifier method appends a Point2D object onto the end of the ArrayList of Point2D objects |
void |
applyTransform(Transform2D transform)
Modifier method applies the Transform2D matrix supplied by the parameter to each of the Point2D objects maintained in the ArrayList. |
void |
createPolygon(int n,
double r)
Modifier methods clears the ArrayList and adds the Point2D objects representing the vertices of a regular n-gon of 'radius' r centered at the origin. |
void |
createUnitSquare()
Modifier methods clears the ArrayList and adds the Point2D objects (0,0), (1,0), (1,1), and (0,1) |
java.util.ArrayList<Point2D> |
getPoints()
Accessor method called to retrieve the ArrayList<Point2D> containing the data |
java.lang.String |
toString()
Returns a String developed, in part, by calling upon Point2D's toString() method |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Point2DList()
Method Detail |
---|
public void createUnitSquare()
public void addPoint(Point2D p)
public void createPolygon(int n, double r)
n
- the number of vertices (sides) of the regular polygonr
- the 'radius' of the polygonpublic void applyTransform(Transform2D transform)
transform
- the transform to be appliedpublic java.util.ArrayList<Point2D> getPoints()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |