Interface IEventDispatcher

All Known Implementing Classes:
EventDispatcher, PdfAAgnosticPdfDocument, PdfADocument, PdfDocument

public interface IEventDispatcher
Event dispatcher interface.
  • Method Details

    • addEventHandler

      void addEventHandler (String type, IEventHandler handler)
      Adds new event handler.
      Parameters:
      type - a type of event to be handled
      handler - event handler
    • dispatchEvent

      void dispatchEvent (Event event)
      Dispatches an event.
      Parameters:
      event - the Event to be dispatched
    • dispatchEvent

      void dispatchEvent (Event event, boolean delayed)
      Dispatches a delayed event. Sometimes event cannot be handled immediately because event handler has not been set yet. In this case event is placed into event ques of dispatcher and is waiting until handler is assigned.
      Parameters:
      event - the Event to be dispatched
      delayed - flag whether Event delayed or not
    • hasEventHandler

      boolean hasEventHandler (String type)
      Checks if event dispatcher as an event handler assigned for a certain event type.
      Parameters:
      type - a type of the Event
      Returns:
      true if event dispatcher as an event handler assigned for a certain event type
    • removeEventHandler

      void removeEventHandler (String type, IEventHandler handler)
      Removes event handler.
      Parameters:
      type - a type of the Event
      handler - event handler IEventHandler
    • removeAllHandlers

      void removeAllHandlers()
      Remove all event handlers.