Holger's
Java API

com.antelmann.util.logging
Class JTextAreaLog

java.lang.Object
  extended by com.antelmann.util.logging.AbstractLogWriter<String>
      extended by com.antelmann.util.logging.JTextAreaLog
All Implemented Interfaces:
Filter<LogEntry>, LogWriter

public class JTextAreaLog
extends AbstractLogWriter<String>

a more efficient visible log as it uses JTextArea methods to append the text

Since:
2013/7/31
Author:
Holger Antelmann
See Also:
JTextComponentLog

Field Summary
 
Fields inherited from class com.antelmann.util.logging.AbstractLogWriter
filter
 
Fields inherited from interface com.antelmann.util.Filter
EXCLUDE_ALL_FILTER, INCLUDE_ALL_FILTER
 
Constructor Summary
JTextAreaLog()
          uses a standard JTextArea
JTextAreaLog(JTextArea ta)
           
 
Method Summary
 JTextArea getComponent()
           
 int getLimit()
           
 void purge()
          purges the log buffer
 void setLimit(int limit)
          set limit to 0 or less for no limit
 void writeLogPattern(String 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 com.antelmann.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

JTextAreaLog

public JTextAreaLog()
uses a standard JTextArea


JTextAreaLog

public JTextAreaLog(JTextArea ta)
Method Detail

getComponent

public JTextArea getComponent()

purge

public void purge()
purges the log buffer


setLimit

public void setLimit(int limit)
set limit to 0 or less for no limit


getLimit

public int getLimit()

writeLogPattern

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

Specified by:
writeLogPattern in class AbstractLogWriter<String>


(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads