iText 7 7.1.9 API
iText.Kernel.Events.IEventDispatcher Interface Reference

Event dispatcher interface. More...

Inheritance diagram for iText.Kernel.Events.IEventDispatcher:
iText.Kernel.Events.EventDispatcher iText.Kernel.Pdf.PdfDocument iText.Pdfa.PdfADocument

Public Member Functions

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

Detailed Description

Event dispatcher interface.

Member Function Documentation

◆ AddEventHandler()

void iText.Kernel.Events.IEventDispatcher.AddEventHandler ( String  type,
IEventHandler  handler 
)

Adds new event handler.

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

Implemented in iText.Kernel.Pdf.PdfDocument, and iText.Kernel.Events.EventDispatcher.

◆ DispatchEvent() [1/2]

void iText.Kernel.Events.IEventDispatcher.DispatchEvent ( Event event )

Dispatches an event.

Parameters
event

Implemented in iText.Kernel.Pdf.PdfDocument, and iText.Kernel.Events.EventDispatcher.

◆ DispatchEvent() [2/2]

void iText.Kernel.Events.IEventDispatcher.DispatchEvent ( Event event,
bool  delayed 
)

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
Parameters
delayed

Implemented in iText.Kernel.Pdf.PdfDocument, and iText.Kernel.Events.EventDispatcher.

◆ HasEventHandler()

bool iText.Kernel.Events.IEventDispatcher.HasEventHandler ( String  type )

Checks if event dispatcher as an event handler assigned for a certain event type.

Parameters
type

Implemented in iText.Kernel.Pdf.PdfDocument, and iText.Kernel.Events.EventDispatcher.

◆ RemoveAllHandlers()

void iText.Kernel.Events.IEventDispatcher.RemoveAllHandlers ( )

Remove all event handlers.

Implemented in iText.Kernel.Pdf.PdfDocument, and iText.Kernel.Events.EventDispatcher.

◆ RemoveEventHandler()

void iText.Kernel.Events.IEventDispatcher.RemoveEventHandler ( String  type,
IEventHandler  handler 
)

Removes event handler.

Parameters
type
Parameters
handler

Implemented in iText.Kernel.Pdf.PdfDocument, and iText.Kernel.Events.EventDispatcher.