|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectBox
A Box has a width, a height and a paintChar used used to paint the Box on a Screen. Examples:
new Box( 3, 4, 'G' ) new Box( 1, 1, '$' )
GGG $
GGG
GGG
GGG
| Constructor Summary | |
Box(int width,
int height,
char paintChar)
Construct a box. |
|
| Method Summary | |
int |
getHeight()
Get the height of this Box. |
int |
getWidth()
Get the width of this Box. |
static void |
main(String[] args)
Unit test for class Box, assuming Screen and Terminal work. |
void |
paintOn(Screen s)
Paint this Box on Screen s at position (0,0). |
void |
paintOn(Screen s,
int x,
int y)
Paint this Box on Screen s at position (x,y). |
void |
setHeight(int height)
Set the height of this Box. |
void |
setWidth(int width)
Set the width of this Box. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Box(int width,
int height,
char paintChar)
width - width in (character) pixels.height - height in (character) pixels.paintChar - character used for painting this Box.| Method Detail |
public int getHeight()
public int getWidth()
public static void main(String[] args)
public void paintOn(Screen s)
s - the Screen on which this box is to be painted.
public void paintOn(Screen s,
int x,
int y)
s - the screen on which this box is to be painted.x - the x position for the box.y - the y position for the box.public void setHeight(int height)
height - the new height in (character) pixels.public void setWidth(int width)
width - the new width in (character) pixels.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||