|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--element.Rect
|
+--element.Oval
Implements an oval object. An oval is the unique elipse that fits within a particular rectangle.
| Fields inherited from class element.Rect |
height,
left,
top,
width |
| Constructor Summary | |
Oval()
Constructs a trivial oval at the origin. |
|
Oval(int x,
int y,
int w,
int h)
Construct an oval bounded by the rectangle with upper-left (x,y), width w, and height h |
|
Oval(Oval r)
Makes a copy of an existing oval. |
|
Oval(Pt p,
Pt q)
Construct an oval within a rectangle defined by two points. |
|
Oval(Rect r)
Construct an oval bounded by an existing rectangle. |
|
| Method Summary | |
void |
clearOn(DrawingWindow d)
Erase oval from the drawing window d. |
java.lang.Object |
clone()
return a distinct copy of this oval |
boolean |
contains(Pt p)
Returns true if p is contained within oval. |
void |
drawOn(DrawingWindow d)
Draw (in the current mode) the oval on the drawing window |
boolean |
equals(java.lang.Object other)
Return true iff this oval equals the other |
void |
fillOn(DrawingWindow d)
Draw a filled oval (in the current mode) on drawing window d. |
int |
hashCode()
Return an integer for use as a hash code |
java.lang.String |
toString()
Construct a string representation of this oval |
| Methods inherited from class element.Rect |
bottom,
bottom,
center,
center,
extend,
height,
height,
left,
left,
move,
moveTo,
moveTo,
Rectangle,
right,
right,
top,
top,
width,
width |
| Methods inherited from class java.lang.Object |
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public Oval()
public Oval(Oval r)
the - existing oval
public Oval(Pt p,
Pt q)
p - one bounding pointq - another bounding pointpublic Oval(Rect r)
r - the bounding rectangle
public Oval(int x,
int y,
int w,
int h)
x - left of bounding rectangley - top of bounding rectanglew - width of ovalh - height of oval| Method Detail |
public boolean contains(Pt p)
p - the point to be consideredpublic void fillOn(DrawingWindow d)
d - the target drawing window.DrawingWindow.fill(element.Drawable),
DrawingWindow.paintMode(),
DrawingWindow.invertMode()public void clearOn(DrawingWindow d)
d - the target drawing windowDrawingWindow.clear(element.Drawable)public void drawOn(DrawingWindow d)
d - the target drawing windowDrawingWindow.paintMode(),
DrawingWindow.invertMode(),
DrawingWindow.draw(element.Drawable)public int hashCode()
public boolean equals(java.lang.Object other)
other - another valid ovalpublic java.lang.Object clone()
public java.lang.String toString()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||