Package com.itextpdf.kernel.pdf.action
Class PdfAnnotationAdditionalActions
java.lang.Object
com.itextpdf.kernel.pdf.PdfObjectWrapper<PdfDictionary>
com.itextpdf.kernel.pdf.action.PdfAnnotationAdditionalActions
A wrapper for annotations additional actions dictionaries. See section 12.6.3 Table 197 of ISO 32000-1. An annotation additional actions dictionary defines the event handlers for annotations
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionLists everyPdfAction
for all documented events for an annotation's additional actions.Returns thePdfAction
for the OnEnter event if there is any, or null.Returns thePdfAction
for the OnExit event if there is any, or null.Returns thePdfAction
for the OnFocus event if there is any, or null.Returns thePdfAction
for the OnLostFocus event if there is any, or null.Returns thePdfAction
for the OnMouseDown event if there is any, or null.Returns thePdfAction
for the OnMouseUp event if there is any, or null.Returns thePdfAction
for the OnPageClosed event if there is any, or null.Returns thePdfAction
for the OnPageLostView event if there is any, or null.Returns thePdfAction
for the OnPageOpened event if there is any, or null.Returns thePdfAction
for the OnPageVisible event if there is any, or null.getPdfActionForEvent
(PdfName eventName) If exists, returns thePdfAction
for this event, otherwise returns null.protected boolean
Defines if the object behind this wrapper must be an indirect object in the resultant document.void
setOnEnter
(PdfAction action) Sets thePdfAction
to perform on the OnEnter event, or removes it when action is null.void
Sets thePdfAction
to perform on the OnExit event, or removes it when action is null.void
setOnFocus
(PdfAction action) Sets thePdfAction
to perform on the OnFocus event, or removes it when action is null.void
setOnLostFocus
(PdfAction action) Sets thePdfAction
to perform on the OnLostFocus event, or removes it when action is null.void
setOnMouseDown
(PdfAction action) Sets thePdfAction
to perform on the OnMouseDown event, or removes it when action is null.void
setOnMouseUp
(PdfAction action) Sets thePdfAction
to perform on the OnMouseUp event, or removes it when action is null.void
setOnPageClosed
(PdfAction action) Sets thePdfAction
to perform on the OnPageClosed event, or removes it when action is null.void
setOnPageLostView
(PdfAction action) Sets thePdfAction
to perform on the OnPageLostView event, or removes it when action is null.void
setOnPageOpened
(PdfAction action) Sets thePdfAction
to perform on the OnPageOpened event, or removes it when action is null.void
setOnPageVisible
(PdfAction action) Sets thePdfAction
to perform on the OnPageVisible event, or removes it when action is null.void
setPdfActionForEvent
(PdfName event, PdfAction action) Sets the action for an event, or removes it when the action is null.Methods inherited from class com.itextpdf.kernel.pdf.PdfObjectWrapper
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, flush, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
-
Constructor Details
-
PdfAnnotationAdditionalActions
-
-
Method Details
-
getOnEnter
Returns thePdfAction
for the OnEnter event if there is any, or null.- Returns:
-
PdfAction
or null
-
setOnEnter
Sets thePdfAction
to perform on the OnEnter event, or removes it when action is null.- Parameters:
-
action
- ThePdfAction
to set or null to remove the action
-
getOnExit
Returns thePdfAction
for the OnExit event if there is any, or null.- Returns:
-
PdfAction
or null
-
setOnExit
Sets thePdfAction
to perform on the OnExit event, or removes it when action is null.- Parameters:
-
action
-PdfAction
The action to set or null to remove the action
-
getOnMouseDown
Returns thePdfAction
for the OnMouseDown event if there is any, or null.- Returns:
-
PdfAction
or null
-
setOnMouseDown
Sets thePdfAction
to perform on the OnMouseDown event, or removes it when action is null.- Parameters:
-
action
-PdfAction
The action to set or null to remove the action
-
getOnMouseUp
Returns thePdfAction
for the OnMouseUp event if there is any, or null.- Returns:
-
PdfAction
or null
-
setOnMouseUp
Sets thePdfAction
to perform on the OnMouseUp event, or removes it when action is null.- Parameters:
-
action
-PdfAction
The action to set or null to remove the action
-
getOnFocus
Returns thePdfAction
for the OnFocus event if there is any, or null.- Returns:
-
PdfAction
or null
-
setOnFocus
Sets thePdfAction
to perform on the OnFocus event, or removes it when action is null.- Parameters:
-
action
-PdfAction
The action to set or null to remove the action
-
getOnLostFocus
Returns thePdfAction
for the OnLostFocus event if there is any, or null.- Returns:
-
PdfAction
or null
-
setOnLostFocus
Sets thePdfAction
to perform on the OnLostFocus event, or removes it when action is null.- Parameters:
-
action
-PdfAction
The action to set or null to remove the action
-
getOnPageOpened
Returns thePdfAction
for the OnPageOpened event if there is any, or null.- Returns:
-
PdfAction
or null
-
setOnPageOpened
Sets thePdfAction
to perform on the OnPageOpened event, or removes it when action is null.- Parameters:
-
action
-PdfAction
The action to set or null to remove the action
-
getOnPageClosed
Returns thePdfAction
for the OnPageClosed event if there is any, or null.- Returns:
-
PdfAction
or null
-
setOnPageClosed
Sets thePdfAction
to perform on the OnPageClosed event, or removes it when action is null.- Parameters:
-
action
-PdfAction
The action to set or null to remove the action
-
getOnPageVisible
Returns thePdfAction
for the OnPageVisible event if there is any, or null.- Returns:
-
PdfAction
or null
-
setOnPageVisible
Sets thePdfAction
to perform on the OnPageVisible event, or removes it when action is null.- Parameters:
-
action
-PdfAction
The action to set or null to remove the action
-
getOnPageLostView
Returns thePdfAction
for the OnPageLostView event if there is any, or null.- Returns:
-
PdfAction
or null
-
setOnPageLostView
Sets thePdfAction
to perform on the OnPageLostView event, or removes it when action is null.- Parameters:
-
action
-PdfAction
The action to set or null to remove the action
-
getAllKnownActions
Lists everyPdfAction
for all documented events for an annotation's additional actions. See section 12.6.3 Table 197 of ISO 32000-1- Returns:
- The list of actions
-
getPdfActionForEvent
If exists, returns thePdfAction
for this event, otherwise returns null. -
setPdfActionForEvent
Sets the action for an event, or removes it when the action is null.- Parameters:
-
event
- the event to set or remove the action for -
action
- thePdfAction
to set or null
-
isWrappedObjectMustBeIndirect
protected boolean isWrappedObjectMustBeIndirect()Defines if the object behind this wrapper must be an indirect object in the resultant document.
If this method returns true it doesn't necessarily mean that object must be in the indirect state at any moment, but rather defines that when the object will be written to the document it will be transformed into indirect object if it's not indirect yet.
Return value of this method shouldn't depend on any logic, it should return always true or false.- Specified by:
-
isWrappedObjectMustBeIndirect
in classPdfObjectWrapper<PdfDictionary>
- Returns:
- true if in the resultant document the object behind the wrapper must be indirect, otherwise false.
-