|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Line
A Line has a length and a paintChar used to paint itself on a Screen. Subclasses of this abstract class specify the direction of the Line.
Field Summary | |
protected int |
length
|
protected char |
paintChar
|
Constructor Summary | |
protected |
Line(int length,
char paintChar)
Construct a Line. |
Method Summary | |
int |
getLength()
Get the length of this line. |
char |
getPaintChar()
Get the paintChar of this Line. |
void |
paintOn(Screen s)
Paint this Line on Screen s at position (0,0). |
abstract void |
paintOn(Screen s,
int x,
int y)
Paint this Line on Screen s at position (x,y). |
void |
setLength(int length)
Set the length of this line. |
void |
setPaintChar(char paintChar)
Set the paintChar of this Line. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int length
protected char paintChar
Constructor Detail |
protected Line(int length, char paintChar)
length
- length in (character) pixels.paintChar
- character used for painting this Line.Method Detail |
public int getLength()
public char getPaintChar()
public void paintOn(Screen s)
s
- the Screen on which this Line is to be painted.public abstract 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.public void setPaintChar(char paintChar)
paintChar
- the new paintChar.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |