Documentation of 'com.jstatcom.model.SymbolEventSupport' Java class
SymbolEventSupport
com.jstatcom.model

Class SymbolEventSupport



  • public final class SymbolEventSupport
    extends java.lang.Object
    A support class for Symbol objects that manages adding, removing and notification of the different SymbolListener. The events fired in dispatch are fired within the AWT event dispatching thread.

    This class is not thread-save but clients must handle synchronization.

    • Constructor Detail

      • SymbolEventSupport

        public SymbolEventSupport()
        SymbolEventSupport constructor.
    • Method Detail

      • addListener

        public void addListener(SymbolListener evtListener,
                                SymbolEventTypes evtType)
        Adds evtListener to the list of listeners for events of type evtType.
        Parameters:
        evtListener - the SymbolListener that gets notified whenever an event of evtType occurs
        evtType - the event type
        Throws:
        java.lang.IllegalArgumentException - if (evtListener == null || evtType == null)
      • dispatchEvent

        public void dispatchEvent(SymbolEvent evt)
        Dispatches evt by calling valueChanged of all registered listeners to events of type evt.getType. The valueChanged methods are called within the event dispatching thread.
        Parameters:
        evt - the event to be dispatched
        Throws:
        java.lang.IllegalArgumentException - if (evt == null)
      • getListenersForType

        public java.util.List<SymbolListener> getListenersForType(SymbolEventTypes evtType)
        Gets a list with all registered listeners for evtType.
        Parameters:
        evtType - the event type
        Returns:
        a copy of the respective list or an initialized list instance with size == 0 if no listeners are registered for evtType
      • removeListener

        public void removeListener(SymbolListener evtListener)
        Removes evtListener from all listener lists. Nothing happens if evtListener is currently not a listener.
        Parameters:
        evtListener - the SymbolListener to be removed
        Throws:
        java.lang.IllegalArgumentException - if (evtListener == null)
      • toString

        public java.lang.String toString()
        Gets a string representation of this.
        Overrides:
        toString in class java.lang.Object
        Returns:
        informative string representation

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.