com.ccg.swing
Class DefaultLogModel

java.lang.Object
  extended by com.ccg.swing.AbstractLogModel
      extended by com.ccg.swing.DefaultLogModel
All Implemented Interfaces:
LogModel

public final class DefaultLogModel
extends AbstractLogModel

A LogModel implementation not associated with the current run-time.

This model is intended to be used in situations where you want to adjust log/debug verbosity levels, but NOT for the active running application. For example, suppose you were creating a application that generated HTML applet stubs dynamically. You might want to be able to specify the log/debug levels the applet should run at via your application, but NOT adjust the active log/debug levels of your active application. In this type of situation, you will want to use this type of LogModel (the editting of non-active log/debug levels).

If you really want a log model that can be used to allow the user to adjust the log/debug output verbosity on the fly of the active application, you really want to use the LogModel provided by SystemLogModel.getInstance().

To see a working example of using the LogModel, DefaultLogModel, SystemLogModel and LogEditor objects in combination, take a look at LogTest.java.

Since:
1.0
Version:
$Revision: 1.1 $
Author:
$Author: pkb $
See Also:
SystemLogModel

Constructor Summary
DefaultLogModel()
           
 
Method Summary
 int getDebugLevel()
          Get the current debug level for debug messages.
 int getLogLevel()
          Get the current log level for logged messages.
 void setDebugLevel(int val)
          Set the current debug level for debug messages.
 void setLogLevel(int val)
          Set the current log level for logged messages.
 
Methods inherited from class com.ccg.swing.AbstractLogModel
addChangeListener, fireChangeEvent, removeChangeListener, toString, validateDebugLevel, validateLogLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultLogModel

public DefaultLogModel()
Method Detail

getLogLevel

public int getLogLevel()
Description copied from interface: LogModel
Get the current log level for logged messages.

Returns:
Current int value assigned.
See Also:
LogModel.setLogLevel(int)

setLogLevel

public void setLogLevel(int val)
Description copied from interface: LogModel
Set the current log level for logged messages.

Note, if you attempt to set a invalid value, it will be silently ignored.

Parameters:
val - New int value to assign.
See Also:
LogModel.getLogLevel()

getDebugLevel

public int getDebugLevel()
Description copied from interface: LogModel
Get the current debug level for debug messages.

Returns:
Current int value assigned.
See Also:
LogModel.setDebugLevel(int)

setDebugLevel

public void setDebugLevel(int val)
Description copied from interface: LogModel
Set the current debug level for debug messages.

Note, if you attempt to set a invalid value, it will be silently ignored.

Parameters:
val - New int value to assign.
See Also:
LogModel.getDebugLevel()


Copyright 1998-1998-2006 null. All Rights Reserved.