com.ccg.swing
Interface LogModel

All Known Implementing Classes:
AbstractLogModel, DefaultLogModel, SystemLogModel

public interface LogModel

A "model" implementation for logging levels and debug verbosity.

The Log and Debug provide a framework for controlling what type of log messages are produced by a system and the verbosity of the debug output of these messages.

The messages are typically produced at run time and are very useful when trouble shooting an application.

This interface defines the methods which a GUI implementation that wish to adjust these levels should work with (or a corresponding logging mechanism may want to deal with).

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:
LogEditor

Method Summary
 void addChangeListener(ChangeListener cl)
          Adds a ChangeListener to be notified when the state changes.
 int getDebugLevel()
          Get the current debug level for debug messages.
 int getLogLevel()
          Get the current log level for logged messages.
 void removeChangeListener(ChangeListener cl)
          Removes a ChangeListener that was previously registered.
 void setDebugLevel(int val)
          Set the current debug level for debug messages.
 void setLogLevel(int val)
          Set the current log level for logged messages.
 

Method Detail

setLogLevel

void setLogLevel(int val)
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:
getLogLevel()

getLogLevel

int getLogLevel()
Get the current log level for logged messages.

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

setDebugLevel

void setDebugLevel(int val)
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:
getDebugLevel()

getDebugLevel

int getDebugLevel()
Get the current debug level for debug messages.

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

addChangeListener

void addChangeListener(ChangeListener cl)
Adds a ChangeListener to be notified when the state changes.

Parameters:
cl - The change listener to be added (must not be null).
Since:
1.0

removeChangeListener

void removeChangeListener(ChangeListener cl)
Removes a ChangeListener that was previously registered.

Parameters:
cl - The change listener to be removed (must not be null).
Since:
1.0


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