org.jscience.util.logging
Class JTextComponentLog

java.lang.Object
  extended by org.jscience.util.logging.AbstractLogWriter
      extended by org.jscience.util.logging.JTextComponentLog
All Implemented Interfaces:
Filter<LogEntry>, LogWriter

public class JTextComponentLog
extends AbstractLogWriter

JTextComponentLog writes abbreviated log messages into a given JTextComponent synchronously. Uses StringLineFormatter.

See Also:
StringLineFormatter, LogException, Logger, LogEntry

Field Summary
 
Fields inherited from class org.jscience.util.logging.AbstractLogWriter
filter, formatter
 
Constructor Summary
JTextComponentLog(javax.swing.text.JTextComponent jtc)
          Creates a new JTextComponentLog object.
 
Method Summary
 javax.swing.text.JTextComponent getComponent()
          DOCUMENT ME!
 int getLimit()
          DOCUMENT ME!
 void purge()
          purges the log buffer
 void setLimit(int limit)
          DOCUMENT ME!
 void writeLogEntry(java.lang.Object pattern)
          This method appends a short version of the entry to internal buffer that is written to the embedded text component.
 
Methods inherited from class org.jscience.util.logging.AbstractLogWriter
accept, getLogFilter, getLogFormatter, setLogFilter, setLogFormatter, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JTextComponentLog

public JTextComponentLog(javax.swing.text.JTextComponent jtc)
Creates a new JTextComponentLog object.

Parameters:
jtc - DOCUMENT ME!
Method Detail

getComponent

public javax.swing.text.JTextComponent getComponent()
DOCUMENT ME!

Returns:
DOCUMENT ME!

purge

public void purge()
purges the log buffer


setLimit

public void setLimit(int limit)
DOCUMENT ME!

Parameters:
limit - DOCUMENT ME!

getLimit

public int getLimit()
DOCUMENT ME!

Returns:
DOCUMENT ME!

writeLogEntry

public void writeLogEntry(java.lang.Object pattern)
This method appends a short version of the entry to internal buffer that is written to the embedded text component.

Specified by:
writeLogEntry in class AbstractLogWriter
Parameters:
pattern - DOCUMENT ME!