|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.iu.cnets.klatsch.misc.LineEditor
public class LineEditor
This class takes care of line editing in the console version of the interpreter. Note that it's not capable of making standard input unbuffered on its own -- that's why the klatsch wrapper calls 'stty -icanon' before firing up Java.
Field Summary | |
---|---|
(package private) History |
history
the history associated with the editor |
(package private) java.io.Reader |
in
our source of data |
(package private) int |
lineNumber
our current line number of input |
(package private) boolean |
noEscape
true to suppress VT100 escape codes |
(package private) java.lang.String |
prompt
the prompt to use for the hapless user |
Constructor Summary | |
---|---|
LineEditor(java.io.Reader in,
java.lang.String prompt,
boolean noEscape)
Initialize with a source of character data, a prompt, and the noEscape flag. |
Method Summary | |
---|---|
java.lang.String |
readLine()
Reads another line of input from our data source. |
(package private) void |
redraw(java.lang.StringBuffer buffer,
int point)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
java.io.Reader in
java.lang.String prompt
boolean noEscape
History history
int lineNumber
Constructor Detail |
---|
public LineEditor(java.io.Reader in, java.lang.String prompt, boolean noEscape)
in
- the character-based data sourceprompt
- the promptnoEscape
- suppress VT100 escape codes?Method Detail |
---|
public java.lang.String readLine() throws java.io.IOException
java.io.IOException
- if a full line could not be readvoid redraw(java.lang.StringBuffer buffer, int point)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |