|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectHLine
A horizontal line has a length and a paintChar used used to paint the line on a Screen.
| Constructor Summary | |
HLine(int length,
char paintChar)
Construct an HLine. |
|
| Method Summary | |
int |
getLength()
Get the length of this line. |
static void |
main(String[] args)
Unit test for class HLine, assuming Screen and Terminal work. |
void |
paintOn(Screen s)
Paint this HLine on Screen s at position (0,0). |
void |
paintOn(Screen s,
int x,
int y)
Paint this HLine on Screen s at position (x,y). |
void |
setLength(int length)
Set the length of this line. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HLine(int length,
char paintChar)
length - length in (character) pixels.paintChar - character used for painting this Line.| Method Detail |
public int getLength()
public static void main(String[] args)
public void paintOn(Screen s)
s - the Screen on which this line is to be painted.
public void paintOn(Screen s,
int x,
int y)
s - the Screen on which this line is to be painted.x - the x position for the line.y - the y position for the line.public void setLength(int length)
length - the new length in (character) pixels.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||