Class AbstractPdfDocumentEventHandler
java.lang.Object
com.itextpdf.kernel.pdf.event.AbstractPdfDocumentEventHandler
- All Implemented Interfaces:
IEventHandler
- Direct Known Subclasses:
SignatureMacIntegrityProtector.SignatureMacContainerEmbedder, SignatureMacIntegrityProtector.SignatureMacPdfObjectAdder, StandaloneMacIntegrityProtector.StandaloneMacContainerEmbedder, StandaloneMacIntegrityProtector.StandaloneMacPdfObjectAdder
Base class for PDF document events handling based on the event type.
Handles AbstractPdfDocumentEvent event fired by PdfDocument.dispatchEvent(AbstractPdfDocumentEvent).
Use PdfDocument.addEventHandler(String, AbstractPdfDocumentEventHandler) to register this handler for
specific type of event.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds new event type to handle by thisAbstractPdfDocumentEventHandlerinstance.protected abstract voidHandles the accepted event.voidHandles the event.
-
Field Details
-
types
-
-
Constructor Details
-
AbstractPdfDocumentEventHandler
protected AbstractPdfDocumentEventHandler()Creates newAbstractPdfDocumentEventHandlerinstance.By default, this instance handles all types of the
AbstractPdfDocumentEventevents. For specific types handling, useaddType(String)method.
-
-
Method Details
-
addType
Adds new event type to handle by thisAbstractPdfDocumentEventHandlerinstance.- Parameters:
type- theAbstractPdfDocumentEventtype to handle- Returns:
- this
AbstractPdfDocumentEventHandlerinstance
-
onEvent
Description copied from interface:IEventHandlerHandles the event.- Specified by:
onEventin interfaceIEventHandler- Parameters:
event- to handle
-
onAcceptedEvent
Handles the accepted event.- Parameters:
event-AbstractPdfDocumentEventto handle
-