Module org.jcommon

Class EventPool

    • Field Detail

      • idListenerList

        protected EventListenerList idListenerList
        The list of listenners attached to the pool
    • Constructor Detail

      • EventPool

        public EventPool()
        Construct a new event pool. This method creates the listener list.
    • Method Detail

      • addListener

        public void addListener​(AWTEventListener listener)
        Add a listener to the event pool. The listener must implements the interface AWTEventListener because the interface EventListener is empty and does not determine a dispatch method.
        Parameters:
        listener - the listener to add.
      • removeListener

        public void removeListener​(AWTEventListener listener)
        Remove a listener from the event pool. The listener must implements interface AWTEventListener because the interface EventListener is empty and does not determine a dispatch method.
        Parameters:
        listener - the listener to remove.
      • dispatchEvent

        public void dispatchEvent​(AWTEvent event)
        Dispatch a new event to all registered listeners. The event must be a subclass of AWTEvent because the listener are AWTEventListener.
        Parameters:
        event - the event to dispatch.