public final class StdOutWriter
extends java.io.PrintWriter
Modifier and Type | Field and Description |
---|---|
private int |
col
approximation of the current column in the text area for auto wrapping at
wrap
characters |
private java.awt.TextArea |
text
text area to write to if in gui mode, gui mode = (text != null)
|
private static int |
wrap
auto wrap lines in gui mode at this value
|
Constructor and Description |
---|
StdOutWriter()
A StdOutWriter, attached to System.out, no gui mode
|
StdOutWriter(java.io.OutputStream out)
A StdOutWrite, attached to the specified output stream, no gui mode
|
Modifier and Type | Method and Description |
---|---|
void |
println()
Begin a new line.
|
void |
setGUIMode(java.awt.TextArea text)
Set the TextArea to write text to.
|
void |
write(char[] buf,
int off,
int len) |
void |
write(int c)
Write a single character.
|
void |
write(java.lang.String s,
int off,
int len) |
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, setError, write, write
private java.awt.TextArea text
private int col
wrap
charactersprivate static final int wrap
public StdOutWriter()
public StdOutWriter(java.io.OutputStream out)
out
- a OutputStream
object.public void setGUIMode(java.awt.TextArea text)
null
.text
- the TextArea to write topublic void write(int c)
write
in class java.io.PrintWriter
c
- a int.public void write(char[] buf, int off, int len)
Write a portion of an array of characters.
write
in class java.io.PrintWriter
public void write(java.lang.String s, int off, int len)
Write a portion of a string.
write
in class java.io.PrintWriter
public void println()
println
in class java.io.PrintWriter