JFlex
Class StdOutWriter

java.lang.Object
  extended byjava.io.Writer
      extended byjava.io.PrintWriter
          extended byJFlex.StdOutWriter

public final class StdOutWriter
extends java.io.PrintWriter

Convenience class for JFlex stdout, redirects output to a TextArea if in GUI mode.


Field Summary
 
Fields inherited from class java.io.PrintWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
StdOutWriter()
          A StdOutWriter, attached to System.out, no gui mode
 
Method Summary
 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)
          Write a portion of an array of characters.
 void write(int c)
          Write a single character.
 void write(java.lang.String s, int off, int len)
          Write a portion of a string.
 
Methods inherited from class java.io.PrintWriter
checkError, close, flush, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, println, setError, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StdOutWriter

public StdOutWriter()
A StdOutWriter, attached to System.out, no gui mode

Method Detail

setGUIMode

public void setGUIMode(java.awt.TextArea text)
Set the TextArea to write text to. Will continue to write to System.out if text is null.

Parameters:
text - the TextArea to write to

write

public void write(int c)
Write a single character.


write

public void write(char[] buf,
                  int off,
                  int len)
Write a portion of an array of characters.


write

public void write(java.lang.String s,
                  int off,
                  int len)
Write a portion of a string.


println

public void println()
Begin a new line. Which actual character/s is/are written depends on the runtime platform.