be.hogent.tarsos.util
Class JLabelHandler

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

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

Utility class to handle logging with a JLabel (status bar)

Author:
Joren Six

Nested Class Summary
static class JLabelHandler.JLabelFormatter
           
 
Constructor Summary
JLabelHandler()
          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.JLabel jLabel)
           
 
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

JLabelHandler

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

Method Detail

setupLoggerHandler

public static void setupLoggerHandler(javax.swing.JLabel jLabel)
Parameters:
jLabel - Setup logging for this jLabel.

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