Holger's Java API

## com.antelmann.util.logging
Class JTextComponentLog

    java.lang.Object
      com.antelmann.util.logging.AbstractLogWriter<String>
          com.antelmann.util.logging.JTextComponentLog

All Implemented Interfaces:
  Filter<LogEntry>, LogWriter

    public class JTextComponentLog

extends AbstractLogWriter<String>

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

Author:
  Holger Antelmann
See Also:
  `StringLineFormatter`, `LogException`, `Logger`, `LogEntry`

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
`JTextComponentLog()` uses a standard JTextArea
`JTextComponentLog(JTextComponent jtc)`

Method Summary
`JTextComponent` `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

### JTextComponentLog

    public JTextComponentLog()

  uses a standard JTextArea

### JTextComponentLog

    public JTextComponentLog(JTextComponent jtc)

Method Detail

### getComponent

    public JTextComponent 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