iText 8.0.2 API
iText.Kernel.Events.EventDispatcher Class Reference

IEventDispatcher implementation that forwards Events to registered IEventHandler implementations. More...

Inheritance diagram for iText.Kernel.Events.EventDispatcher:
iText.Kernel.Events.IEventDispatcher

Public Member Functions

virtual void  AddEventHandler (String type, iText.Kernel.Events.IEventHandler handler)
  Adds new event handler. More...
 
virtual void  DispatchEvent (Event @event)
  Dispatches an event. More...
 
virtual void  DispatchEvent (Event @event, bool delayed)
  Dispatches a delayed event. More...
 
virtual bool  HasEventHandler (String type)
  Checks if event dispatcher as an event handler assigned for a certain event type. More...
 
virtual void  RemoveEventHandler (String type, iText.Kernel.Events.IEventHandler handler)
  Removes event handler. More...
 
virtual void  RemoveAllHandlers ()
  Remove all event handlers. More...
 

Detailed Description

IEventDispatcher implementation that forwards Events to registered IEventHandler implementations.

Member Function Documentation

◆ AddEventHandler()

virtual void iText.Kernel.Events.EventDispatcher.AddEventHandler ( String  type,
iText.Kernel.Events.IEventHandler  handler 
)
inlinevirtual

Adds new event handler.

Parameters
type a type of event to be handled
handler event handler

Implements iText.Kernel.Events.IEventDispatcher.

◆ DispatchEvent() [1/2]

virtual void iText.Kernel.Events.EventDispatcher.DispatchEvent ( Event event )
inlinevirtual

Dispatches an event.

Parameters
event the Event to be dispatched

Implements iText.Kernel.Events.IEventDispatcher.

◆ DispatchEvent() [2/2]

virtual void iText.Kernel.Events.EventDispatcher.DispatchEvent ( Event event,
bool  delayed 
)
inlinevirtual

Dispatches a delayed event.

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

Implements iText.Kernel.Events.IEventDispatcher.

◆ HasEventHandler()

virtual bool iText.Kernel.Events.EventDispatcher.HasEventHandler ( String  type )
inlinevirtual

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

Implements iText.Kernel.Events.IEventDispatcher.

◆ RemoveAllHandlers()

virtual void iText.Kernel.Events.EventDispatcher.RemoveAllHandlers ( )
inlinevirtual

Remove all event handlers.

Implements iText.Kernel.Events.IEventDispatcher.

◆ RemoveEventHandler()

virtual void iText.Kernel.Events.EventDispatcher.RemoveEventHandler ( String  type,
iText.Kernel.Events.IEventHandler  handler 
)
inlinevirtual

Removes event handler.

Parameters
type a type of the Event
handler event handler IEventHandler

Implements iText.Kernel.Events.IEventDispatcher.