public class ASCIIPrompter
extends java.lang.Object
Constructor and Description |
---|
ASCIIPrompter()
Creates a form with a labeled text field to prompt the user for text input.
|
ASCIIPrompter(boolean logIt)
Creates a form with a labeled text field to prompt the user for text input.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the ASCIIPrompter and frees resources.
|
boolean |
isDataEror()
This method returns true if the last operation failed due to a data error.
|
boolean |
isEOF()
This method returns true if the last operation failed due to an end of file simulated
by the user pressing End.
|
boolean |
readBoolean()
Reads a boolean from the textfield.
|
byte |
readByte()
Reads a byte from the textfield.
|
char |
readC()
Reads a char from the textfield.
|
char |
readChar()
Reads a char from the textfield.
|
double |
readDouble()
Reads a double from the textfield.
|
float |
readFloat()
Reads a float from the textfield.
|
int |
readInt()
Reads an int from the textfield.
|
long |
readLong()
Reads a long from the textfield.
|
short |
readShort()
Reads a short from the textfield.
|
java.lang.String |
readString()
Reads a String from the textfield.
|
void |
setLabel(java.lang.String label)
Changes the text of the label (prompt) on the form.
|
boolean |
successful()
This method returns true if the last opperation was successful, false otherwise.
|
public ASCIIPrompter()
public ASCIIPrompter(boolean logIt)
logIt
- whether a log file should be createdpublic boolean successful()
public boolean isDataEror()
public boolean isEOF()
public void close()
public void setLabel(java.lang.String label)
label
- The text to be displayed in the labelpublic byte readByte()
public char readChar()
public char readC()
public double readDouble()
public float readFloat()
public int readInt()
public short readShort()
public long readLong()
public java.lang.String readString()
public boolean readBoolean()