|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--element.Rect | +--element.RoundRect
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.
Field Summary | |
protected int |
cornerHeight
|
protected int |
cornerWidth
|
Fields inherited from class element.Rect |
height,
left,
top,
width |
Constructor Summary | |
RoundRect()
post: constructs a trivial rectangle at origin |
|
RoundRect(int x,
int y,
int w,
int h)
pre: w >= 0, h >= 0 post: constructs rectangle with top left at (x,y) width w, height h |
|
RoundRect(int x,
int y,
int w,
int h,
int cw,
int ch)
pre: w >= 0, h >= 0 post: constructs rectangle with top left at (x,y) width w, height h |
|
RoundRect(Pt p,
Pt q)
|
|
RoundRect(Rect r,
int cw,
int ch)
post: constructs a rounded rectangle |
|
RoundRect(RoundRect r)
|
Method Summary | |
void |
clearOn(DrawingWindow d)
Erase rectangle from the drawing window d. |
java.lang.Object |
clone()
post: returns a distinct copy of the Object |
boolean |
contains(Pt p)
Returns true if p is contained within rectangle |
int |
cornerHeight()
|
void |
cornerHeight(int ch)
|
int |
cornerWidth()
|
void |
cornerWidth(int cw)
|
void |
drawOn(DrawingWindow d)
Draw (in the current mode) the rectangle on the drawing window |
boolean |
equals(java.lang.Object other)
post: returns true if two round rects are equal |
void |
fillOn(DrawingWindow d)
Draw a filled rectangle (in the current mode) on drawing window d. |
int |
hashCode()
post: returns suitable hash code |
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 |
Field Detail |
protected int cornerWidth
protected int cornerHeight
Constructor Detail |
public RoundRect()
public RoundRect(Pt p, Pt q)
p
- q
- public RoundRect(Rect r, int cw, int ch)
r
- cw
- ch
- public RoundRect(int x, int y, int w, int h, int cw, int ch)
x
- y
- w
- h
- cw
- ch
- public RoundRect(int x, int y, int w, int h)
x
- y
- w
- h
- public RoundRect(RoundRect r)
r
- Method Detail |
public int cornerWidth()
public int cornerHeight()
public void cornerWidth(int cw)
cw
- public void cornerHeight(int ch)
ch
- public boolean contains(Pt p)
p
- public 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 |