jess.awt
Class TextAreaWriter

java.lang.Object
  |
  +--java.io.Writer
        |
        +--jess.awt.TextAreaWriter
All Implemented Interfaces:
java.io.Serializable

public class TextAreaWriter
extends java.io.Writer
implements java.io.Serializable

TextAreaWriter: a simple Writer, suitable for constructing a PrintWriter, which uses a TextArea as its output. This class is a convenient way to write a GUI in which Jess prints its output to a text widget. Contents are kept to a maximum of 32000 characters, assuming that no other code appends to this TextArea.

(C) 1998 E.J. Friedman-Hill and the Sandia Corporation

Author:
Ernest J. Friedman-Hill
See Also:
Serialized Form

Fields inherited from class java.io.Writer
lock
 
Constructor Summary
TextAreaWriter(java.awt.TextArea area)
          Call this with an already constructed TextArea object, which you can put wherever you'd like.
 
Method Summary
 void clear()
           
 void close()
          Does nothing
 void flush()
          Flushes pending output to the TextArea.
 void write(char[] b, int off, int len)
          Writes a portion of an array of characters to the TextArea.
 
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, toString, wait, wait, wait
 

Constructor Detail

TextAreaWriter

public TextAreaWriter(java.awt.TextArea area)
Call this with an already constructed TextArea object, which you can put wherever you'd like.
Parameters:
area - The text area
Method Detail

clear

public void clear()

close

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

flush

public void flush()
Flushes pending output to the TextArea.
Overrides:
flush in class java.io.Writer

write

public void write(char[] b,
                  int off,
                  int len)
Writes a portion of an array of characters to the TextArea. No output is actually done until flush() is called.
Overrides:
write in class java.io.Writer
Parameters:
b - The array of characters
off - The first character in the array to write
len - The number of characters form the array to write
See Also:
flush()

© 1997 E.J. Friedman-Hill and Sandia Corporation