|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
com.lightdev.app.ddnscl.io.TextComponentStream
a custom OutputStream that allows to optionally
echo output to a JTextArea.
In this application this stream is used to log messages to a JTextArea.
For this purpose the application logger is extended by an additional
StreamHandler which allows the logger to log to an instance of this
class. Upon initialization of the application, a JTextArea is registered to
this TextComponentStream so that all logging to this stream finally
is shown in the JTextArea.
| Constructor Summary | |
TextComponentStream()
constructor |
|
| Method Summary | |
void |
flush()
empty the output buffer and transfer buffered output to a text component (if one is registered with this stream) |
void |
setTextComponent(JTextArea ta)
set the text component to which output shall be echoed |
void |
write(int b)
write to an array list, i.e. buffer output until flush() is called which is when the buffered output is transferred to the text component and the buffer is cleared |
| Methods inherited from class java.io.OutputStream |
close, write, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TextComponentStream()
| Method Detail |
public void setTextComponent(JTextArea ta)
ta - JTextArea the component to echo topublic void write(int b)
b - intpublic void flush()
|
Copyright (c) 2004 Ulrich Hilger | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||