adavid.io
Class TextAreaWriter

java.lang.Object
  |
  +--java.io.Writer
        |
        +--adavid.io.TextAreaWriter

public class TextAreaWriter
extends java.io.Writer

TextAreaWriter Writer to a TextArea


Fields inherited from class java.io.Writer
lock
 
Constructor Summary
TextAreaWriter(java.awt.TextArea ta)
          constructor: output to a text area
TextAreaWriter(java.awt.TextArea ta, int size)
          constructor: the text area and size of the buffer to use (none by default)
 
Method Summary
 void close()
          implements close
 void flush()
          implements flush
 java.lang.String toString()
          returns the written string
 void write(char[] cbuf, int off, int len)
          implements the writer: writes the byte to the string buffer
 
Methods inherited from class java.io.Writer
write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TextAreaWriter

public TextAreaWriter(java.awt.TextArea ta)
constructor: output to a text area

TextAreaWriter

public TextAreaWriter(java.awt.TextArea ta,
                      int size)
constructor: the text area and size of the buffer to use (none by default)
Method Detail

write

public void write(char[] cbuf,
                  int off,
                  int len)
implements the writer: writes the byte to the string buffer
Overrides:
write in class java.io.Writer

toString

public java.lang.String toString()
returns the written string
Overrides:
toString in class java.lang.Object

flush

public void flush()
implements flush
Overrides:
flush in class java.io.Writer

close

public void close()
implements close
Overrides:
close in class java.io.Writer