|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectScreen
A Screen is a (width*height) grid of (character) 'pixels' on which we may paint various shapes. It can be drawn to a Terminal.
Constructor Summary | |
Screen(int width,
int height)
Construct a Screen. |
Method Summary | |
void |
clear()
Clear the Screen, painting a blank at every pixel. |
void |
draw(Terminal t)
Draw this Screen on a Terminal. |
int |
getHeight()
How high is this Screen? |
int |
getWidth()
How wide is this Screen? |
void |
paintAt(char c,
int x,
int y)
Paint a character pixel at position (x,y). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Screen(int width, int height)
width
- the number of pixels in the x direction.height
- the number of pixels in the y direction.Method Detail |
public void clear()
public void draw(Terminal t)
t
- the Terminal on which to draw this Screen.public int getHeight()
public int getWidth()
public void paintAt(char c, int x, int y)
c
- the character to be painted.x
- the (horizontal) x position.y
- the (vertical) y position.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |