|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--element.Rect | +--element.Oval | +--element.Circle
Copyright (c) 1997 McGraw-Hill All Rights Reserved.
Permission to use, copy, modify, and distribute this software and its documentation for NON-COMMERCIAL purposes and without fee is hereby granted provided that this copyright notice appears in all copies. Please refer to the file "copyright.html" for further important copyright and licensing information.
MCGRAW-HILL MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. MCGRAW-HILL SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
Fields inherited from class element.Rect |
height,
left,
top,
width |
Constructor Summary | |
Circle()
post: constructs a trivial circle at origin |
|
Circle(Drawable d)
post: constructs a Circle from a drawable |
|
Circle(int x,
int y,
int r)
pre: r >= 0 post: constructs circle with center at (x,y), radius r |
|
Circle(Pt p,
int r)
pre: r >= 0 post: constructs circle with center p, radius r |
Method Summary | |
void |
clearOn(DrawingWindow d)
Erase oval from the drawing window d. |
java.lang.Object |
clone()
post: returns a distinct copy of the Object |
boolean |
contains(Pt p)
post: return true iff point p is within this circle |
void |
drawOn(DrawingWindow d)
Draw (in the current mode) the oval on the drawing window |
boolean |
equals(java.lang.Object other)
post: returns true if two rects are equal |
void |
fillOn(DrawingWindow d)
Draw a filled oval (in the current mode) on drawing window d. |
int |
hashCode()
post: returns suitable hash code |
int |
radius()
post: returns radius of circle |
void |
radius(int r)
pre: r >= 0 post: sets radius of the circle |
java.lang.String |
toString()
post: returns a string representation of Object |
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 Circle()
public Circle(Drawable d)
r
- public Circle(int x, int y, int r)
x
- y
- r
- public Circle(Pt p, int r)
p
- r
- Method Detail |
public boolean contains(Pt p)
p
- a point possibly within a circlepublic int radius()
public void radius(int r)
r
- new circle radiuspublic void fillOn(DrawingWindow d)
d
- public void clearOn(DrawingWindow d)
d
- public void drawOn(DrawingWindow d)
d
- public int hashCode()
public boolean equals(java.lang.Object other)
other
- public 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 |