public class TLcdStatusEventSupport<T> extends Object
Constructor and Description |
---|
TLcdStatusEventSupport() |
Modifier and Type | Method and Description |
---|---|
void |
addStatusListener(ILcdStatusListener<T> aStatusListener)
Adds a status listener that will listen to the events fired using
fireStatusEvent(com.luciad.util.TLcdStatusEvent<T>) . |
ILcdStatusListener<T> |
asListener()
Returns a status listener that forwards all received events to the registered listeners.
|
void |
fireStatusEvent(TLcdStatusEvent<T> aStatusEvent)
Fires a status event, thus notifying all listeners that were added using
addStatusListener(com.luciad.util.ILcdStatusListener<T>) . |
ILcdStatusListener<T>[] |
getStatusListeners()
Returns an array containing all listeners that were added using
addStatusListener(com.luciad.util.ILcdStatusListener<T>) . |
boolean |
isTraceOn()
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
removeStatusListener(ILcdStatusListener<T> aStatusListener)
Removes a status listener that listened to the events fired using this instances
fireStatusEvent(com.luciad.util.TLcdStatusEvent<T>) . |
static void |
setClassTraceOn(boolean aClassTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
setTraceOn(boolean aTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
public static void setClassTraceOn(boolean aClassTraceOn)
true
then all log messages are recorded, otherwise only
the informative, warning and error messages are recorded.aClassTraceOn
- if true then all log messages are recorded,
otherwise only the informative, warning and error messages are recorded.public void setTraceOn(boolean aTraceOn)
true
or false
as argument automatically turns
off tracing for all other class instances for which
setTraceOn
has not been called.
If the argument is false
then only the informative, warning
and error log messages are recorded.aTraceOn
- if true then all log messages are recorded for this
instance. If false, then only the informative, warning and
error log messages are recorded.public boolean isTraceOn()
true
if tracing is enabled for this class.public void addStatusListener(ILcdStatusListener<T> aStatusListener)
fireStatusEvent(com.luciad.util.TLcdStatusEvent<T>)
.aStatusListener
- a listener for all events fired by this instance. The listener must not be null.NullPointerException
- when the listener passed is null.removeStatusListener(com.luciad.util.ILcdStatusListener<T>)
public void removeStatusListener(ILcdStatusListener<T> aStatusListener)
fireStatusEvent(com.luciad.util.TLcdStatusEvent<T>)
.aStatusListener
- a listener for all events fired by this instance.addStatusListener(com.luciad.util.ILcdStatusListener<T>)
public void fireStatusEvent(TLcdStatusEvent<T> aStatusEvent)
addStatusListener(com.luciad.util.ILcdStatusListener<T>)
.aStatusEvent
- the status event to pass to all listeners.public ILcdStatusListener<T>[] getStatusListeners()
addStatusListener(com.luciad.util.ILcdStatusListener<T>)
.
If no listeners were added, an empty array will be returned.addStatusListener(com.luciad.util.ILcdStatusListener<T>)
.public ILcdStatusListener<T> asListener()