be.hogent.tarsos.util
Class TextAreaHandler

java.lang.Object
  extended by java.util.logging.Handler
      extended by be.hogent.tarsos.util.TextAreaHandler

public final class TextAreaHandler
extends java.util.logging.Handler

Utility class to handle logging with a JTextArea

Author:
Joren Six

Constructor Summary
TextAreaHandler()
          Include filtering mechanism as it is not included in the (lame) Abstract Handler class.
 
Method Summary
 void close()
           
 void flush()
           
 void publish(java.util.logging.LogRecord logRecord)
           
 void setLevel(java.util.logging.Level newLevel)
          Must capture level to use in our custom filter, because this is not done in the abstract class.
static void setupLoggerHandler(javax.swing.JTextArea logJTextArea)
           
 
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextAreaHandler

public TextAreaHandler()
Include filtering mechanism as it is not included in the (lame) Abstract Handler class.

Method Detail

setupLoggerHandler

public static void setupLoggerHandler(javax.swing.JTextArea logJTextArea)
Parameters:
logJTextArea - setup logging for a JTextarea

publish

public void publish(java.util.logging.LogRecord logRecord)
Specified by:
publish in class java.util.logging.Handler

close

public void close()
Specified by:
close in class java.util.logging.Handler

flush

public void flush()
Specified by:
flush in class java.util.logging.Handler

setLevel

public void setLevel(java.util.logging.Level newLevel)
Must capture level to use in our custom filter, because this is not done in the abstract class.

Overrides:
setLevel in class java.util.logging.Handler