public class ASCIIDisplayer
extends java.lang.Object
Constructor and Description |
---|
ASCIIDisplayer()
Constructs an ASCIIDisplayer as a form on the screen with a text area to which text may be written.
|
ASCIIDisplayer(int nRow,
int nCol)
Constructs an ASCIIDisplayer as a form on the screen with a text area of specified number
of rows and columns, to which text may be written.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the ASCIIDisplayer and frees resources when the user presses Close.
|
void |
hide()
Makes the ASCIIDisplayer invisible, so that it can not be seen on the desktop.
|
void |
newLine()
Writes a newline character so that the next write starts at the beginning of
the next line.
|
void |
setLabel(java.lang.String label)
Changes the text of the label on the text area of the ASCIIDisplayer.
|
void |
show()
Makes the ASCIIDisplayer visible, so that it can be seen on the desktop.
|
void |
waitForUser()
Waits for the user to finish using the ASCIIDisplayer and press OK.
|
void |
writeBoolean(boolean b)
Writes a boolean to the displayer.
|
void |
writeByte(byte b)
Writes a byte to the displayer.
|
void |
writeByte(byte b,
int length)
Writes a byte to the displayer.
|
void |
writeC(char c)
Writes a char to the displayer.
|
void |
writeChar(char c)
Writes a char to the displayer.
|
void |
writeDouble(double d)
Writes a double to the displayer.
|
void |
writeDouble(double d,
int length,
int decimals)
Writes a double to the displayer.
|
void |
writeEOL()
Deprecated.
Use newLine() instead.
|
void |
writeFloat(float f)
Writes a float to the displayer.
|
void |
writeFloat(float f,
int length,
int decimals)
Writes a float to the displayer.
|
void |
writeInt(int i)
Writes an int to the displayer.
|
void |
writeInt(int i,
int length)
Writes an int to the displayer.
|
void |
writeLine(java.lang.String s)
Writes a String to the displayer with a newline character at the end of the String.
|
void |
writeLong(long l)
Writes a long to the displayer.
|
void |
writeLong(long l,
int length)
Writes a long to the displayer.
|
void |
writeObject(java.lang.Object o)
Writes the String representation of an Object to the displayer.
|
void |
writeShort(short s)
Writes a short to the displayer.
|
void |
writeShort(short s,
int length)
Writes a short to the displayer.
|
void |
writeString(java.lang.String s)
Writes a String to the displayer.
|
public ASCIIDisplayer()
public ASCIIDisplayer(int nRow, int nCol)
nRow
- number of rowsnCol
- number of columnspublic void setLabel(java.lang.String label)
label
- The text to be displayed in the labelpublic void writeByte(byte b)
b
- a byte to be displayed on the displayerpublic void writeChar(char c)
c
- char to be displayed on the displayerpublic void writeC(char c)
c
- a char to be displayed on the displayerpublic void writeDouble(double d)
d
- a double to be displayed on the displayerpublic void writeFloat(float f)
f
- a float to be displayed on the displayerpublic void writeInt(int i)
i
- an int to be displayed on the displayerpublic void writeShort(short s)
s
- a short to be displayed on the displayerpublic void writeLong(long l)
l
- a long to be displayed on the displayerpublic void writeString(java.lang.String s)
s
- a String to be displayed on the displayerpublic void writeBoolean(boolean b)
b
- a boolean to be displayed on the displayerpublic void writeLine(java.lang.String s)
s
- a String to be displayed on the displayerpublic void writeEOL()
public void writeObject(java.lang.Object o)
o
- the object to be written.public void newLine()
public void writeByte(byte b, int length)
b
- a byte to be displayed on the displayerlength
- the number of characters that the output will be.public void writeDouble(double d, int length, int decimals)
d
- a double to be displayed on the displayerlength
- the number of characters that will be outputed.decimals
- the number of decimal characters that will be outputted.public void writeFloat(float f, int length, int decimals)
f
- a float to be displayed on the displayerlength
- the number of characters that will be outputed.decimals
- the number of decimal characters that will be outputted.public void writeInt(int i, int length)
i
- an int to be displayed on the displayerlength
- the number of characters that the output will be.public void writeShort(short s, int length)
s
- a short to be displayed on the displayerlength
- the number of characters that the output will be.public void writeLong(long l, int length)
l
- a long to be displayed on the displayerlength
- the number of characters that the output will be.public void waitForUser()
public void show()
public void hide()
public void close()