Class TLcdStatusEventSupport<T>

java.lang.Object
com.luciad.util.TLcdStatusEventSupport<T>

public class TLcdStatusEventSupport<T> extends Object
This class provides support to register listeners to TLcdStatusEvent objects. It has a list of ILcdStatusListener objects. Listeners can be added and removed and events can be sent out to the registered listeners.
  • Constructor Details

    • TLcdStatusEventSupport

      public TLcdStatusEventSupport()
  • Method Details

    • setClassTraceOn

      public static void setClassTraceOn(boolean aClassTraceOn)
      Deprecated.
      This method has been deprecated. It is recommended to use the standard Java logging framework directly.
      Enables tracing for all instances of this class. If the argument is true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
      Parameters:
      aClassTraceOn - if true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
    • setTraceOn

      public void setTraceOn(boolean aTraceOn)
      Deprecated.
      This method has been deprecated. It is recommended to use the standard Java logging framework directly.
      Enables tracing for this class instance. Calling this method with either 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.
      Parameters:
      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.
    • isTraceOn

      public boolean isTraceOn()
      Deprecated.
      This method has been deprecated. It is recommended to use the standard Java logging framework directly.
      Returns true if tracing is enabled for this class.
      Returns:
      true if tracing is enabled for this class, false otherwise.
    • addStatusListener

      public void addStatusListener(ILcdStatusListener<T> aStatusListener)
      Adds a status listener that will listen to the events fired using fireStatusEvent(com.luciad.util.TLcdStatusEvent<T>).
      Parameters:
      aStatusListener - a listener for all events fired by this instance. The listener must not be null.
      Throws:
      NullPointerException - when the listener passed is null.
      See Also:
    • removeStatusListener

      public void removeStatusListener(ILcdStatusListener<T> aStatusListener)
      Removes a status listener that listened to the events fired using this instances fireStatusEvent(com.luciad.util.TLcdStatusEvent<T>).
      Parameters:
      aStatusListener - a listener for all events fired by this instance.
      See Also:
    • fireStatusEvent

      public void fireStatusEvent(TLcdStatusEvent<T> aStatusEvent)
      Fires a status event, thus notifying all listeners that were added using addStatusListener(com.luciad.util.ILcdStatusListener<T>).
      Parameters:
      aStatusEvent - the status event to pass to all listeners.
    • getStatusListeners

      public ILcdStatusListener<T>[] getStatusListeners()
      Returns an array containing all listeners that were added using addStatusListener(com.luciad.util.ILcdStatusListener<T>). If no listeners were added, an empty array will be returned.
      Returns:
      an array containing all listeners that were added using addStatusListener(com.luciad.util.ILcdStatusListener<T>).
    • asListener

      public ILcdStatusListener<T> asListener()
      Returns a status listener that forwards all received events to the registered listeners.
      Returns:
      a forwarding status listener
      Since:
      2016.1