public abstract class OutputWriter extends PrintWriter
println
, passing an instance
of OutputListener
which should be called when a line is
clicked or the caret in the output window enters it.out
Modifier | Constructor and Description |
---|---|
protected |
OutputWriter(Writer w)
Make an output writer.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
println(String s,
OutputListener l)
Print a line which will be displayed as a hyperlink, calling the
passed
OutputListener if it is clicked, if the caret
enters it, or if the enter key is pressed over it. |
void |
println(String s,
OutputListener l,
boolean important)
Print a line which will be displayed as a hyperlink, calling the
passed
OutputListener if it is clicked, if the caret
enters it, or if the enter key is pressed over it. |
abstract void |
reset()
Clear the output pane.
|
append, append, append, checkError, clearError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write, write, write, write, write
protected OutputWriter(Writer w)
w
- the underlying writerpublic abstract void println(String s, OutputListener l) throws IOException
OutputListener
if it is clicked, if the caret
enters it, or if the enter key is pressed over it.s
- a string to print to the tabl
- a listener that will receive events about this lineIOException
- if the string could not be printedpublic void println(String s, OutputListener l, boolean important) throws IOException
OutputListener
if it is clicked, if the caret
enters it, or if the enter key is pressed over it.
Implementors of this class
are encouraged to override this method, which is not abstract for backward
compatibility reasons only.s
- a string to print to the tabl
- a listener that will receive events about this lineimportant
- mark the line as important.
Makes the UI respond appropriately, eg. stop the automatic scrolling
or highlight the hyperlink.IOException
- if the string could not be printedpublic abstract void reset() throws IOException
InputOutput
. It is ambiguous what it means
to reset stdout but not stderr, etc. For the current implementation, reset
should be called on the stdout.IOException
- if there is a problem