ch.claudio.lib
Class JTextAreaWriter

java.lang.Object
  extended by java.io.Writer
      extended by ch.claudio.lib.JTextAreaWriter
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, java.lang.Appendable

public class JTextAreaWriter
extends java.io.Writer

Writer which writes to a text area.

Version:
$Id: JTextAreaWriter.java 19 2006-02-22 16:24:35Z $
Author:
Claudio Nieder

Field Summary
protected  javax.swing.JTextArea target
           
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
JTextAreaWriter(javax.swing.JTextArea targetArea)
           
 
Method Summary
 void close()
           
 void flush()
           
 void write(char[] cbuf)
           
 void write(char[] cbuf, int off, int len)
           
 void write(int c)
           
 void write(java.lang.String str)
           
 void write(java.lang.String str, int ofs, int len)
           
 
Methods inherited from class java.io.Writer
append, append, append
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

target

protected javax.swing.JTextArea target
Constructor Detail

JTextAreaWriter

public JTextAreaWriter(javax.swing.JTextArea targetArea)
Parameters:
targetArea - The JTextArea into which to write.
Method Detail

write

public void write(char[] cbuf,
                  int off,
                  int len)
Specified by:
write in class java.io.Writer
See Also:
Writer.write(char[], int, int)

write

public void write(int c)
Overrides:
write in class java.io.Writer
See Also:
Writer.write(int)

write

public void write(java.lang.String str)
Overrides:
write in class java.io.Writer
See Also:
Writer.write(java.lang.String)

write

public void write(java.lang.String str,
                  int ofs,
                  int len)
Overrides:
write in class java.io.Writer
See Also:
Writer.write(java.lang.String, int, int)

write

public void write(char[] cbuf)
Overrides:
write in class java.io.Writer
See Also:
Writer.write(char[])

flush

public void flush()
Specified by:
flush in interface java.io.Flushable
Specified by:
flush in class java.io.Writer
See Also:
Writer.flush()

close

public void close()
Specified by:
close in interface java.io.Closeable
Specified by:
close in class java.io.Writer
See Also:
Writer.close()