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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionLists everyPdfActionfor all documented events for an annotation's additional actions.Returns thePdfActionfor the OnEnter event if there is any, or null.Returns thePdfActionfor the OnExit event if there is any, or null.Returns thePdfActionfor the OnFocus event if there is any, or null.Returns thePdfActionfor the OnLostFocus event if there is any, or null.Returns thePdfActionfor the OnMouseDown event if there is any, or null.Returns thePdfActionfor the OnMouseUp event if there is any, or null.Returns thePdfActionfor the OnPageClosed event if there is any, or null.Returns thePdfActionfor the OnPageLostView event if there is any, or null.Returns thePdfActionfor the OnPageOpened event if there is any, or null.Returns thePdfActionfor the OnPageVisible event if there is any, or null.getPdfActionForEvent(PdfName eventName) If exists, returns thePdfActionfor this event, otherwise returns null.protected booleanDefines if the object behind this wrapper must be an indirect object in the resultant document.voidsetOnEnter(PdfAction action) Sets thePdfActionto perform on the OnEnter event, or removes it when action is null.voidSets thePdfActionto perform on the OnExit event, or removes it when action is null.voidsetOnFocus(PdfAction action) Sets thePdfActionto perform on the OnFocus event, or removes it when action is null.voidsetOnLostFocus(PdfAction action) Sets thePdfActionto perform on the OnLostFocus event, or removes it when action is null.voidsetOnMouseDown(PdfAction action) Sets thePdfActionto perform on the OnMouseDown event, or removes it when action is null.voidsetOnMouseUp(PdfAction action) Sets thePdfActionto perform on the OnMouseUp event, or removes it when action is null.voidsetOnPageClosed(PdfAction action) Sets thePdfActionto perform on the OnPageClosed event, or removes it when action is null.voidsetOnPageLostView(PdfAction action) Sets thePdfActionto perform on the OnPageLostView event, or removes it when action is null.voidsetOnPageOpened(PdfAction action) Sets thePdfActionto perform on the OnPageOpened event, or removes it when action is null.voidsetOnPageVisible(PdfAction action) Sets thePdfActionto perform on the OnPageVisible event, or removes it when action is null.voidsetPdfActionForEvent(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 thePdfActionfor the OnEnter event if there is any, or null.- Returns:
-
PdfActionor null
-
setOnEnter
Sets thePdfActionto perform on the OnEnter event, or removes it when action is null.- Parameters:
-
action- ThePdfActionto set or null to remove the action
-
getOnExit
Returns thePdfActionfor the OnExit event if there is any, or null.- Returns:
-
PdfActionor null
-
setOnExit
Sets thePdfActionto perform on the OnExit event, or removes it when action is null.- Parameters:
-
action-PdfActionThe action to set or null to remove the action
-
getOnMouseDown
Returns thePdfActionfor the OnMouseDown event if there is any, or null.- Returns:
-
PdfActionor null
-
setOnMouseDown
Sets thePdfActionto perform on the OnMouseDown event, or removes it when action is null.- Parameters:
-
action-PdfActionThe action to set or null to remove the action
-
getOnMouseUp
Returns thePdfActionfor the OnMouseUp event if there is any, or null.- Returns:
-
PdfActionor null
-
setOnMouseUp
Sets thePdfActionto perform on the OnMouseUp event, or removes it when action is null.- Parameters:
-
action-PdfActionThe action to set or null to remove the action
-
getOnFocus
Returns thePdfActionfor the OnFocus event if there is any, or null.- Returns:
-
PdfActionor null
-
setOnFocus
Sets thePdfActionto perform on the OnFocus event, or removes it when action is null.- Parameters:
-
action-PdfActionThe action to set or null to remove the action
-
getOnLostFocus
Returns thePdfActionfor the OnLostFocus event if there is any, or null.- Returns:
-
PdfActionor null
-
setOnLostFocus
Sets thePdfActionto perform on the OnLostFocus event, or removes it when action is null.- Parameters:
-
action-PdfActionThe action to set or null to remove the action
-
getOnPageOpened
Returns thePdfActionfor the OnPageOpened event if there is any, or null.- Returns:
-
PdfActionor null
-
setOnPageOpened
Sets thePdfActionto perform on the OnPageOpened event, or removes it when action is null.- Parameters:
-
action-PdfActionThe action to set or null to remove the action
-
getOnPageClosed
Returns thePdfActionfor the OnPageClosed event if there is any, or null.- Returns:
-
PdfActionor null
-
setOnPageClosed
Sets thePdfActionto perform on the OnPageClosed event, or removes it when action is null.- Parameters:
-
action-PdfActionThe action to set or null to remove the action
-
getOnPageVisible
Returns thePdfActionfor the OnPageVisible event if there is any, or null.- Returns:
-
PdfActionor null
-
setOnPageVisible
Sets thePdfActionto perform on the OnPageVisible event, or removes it when action is null.- Parameters:
-
action-PdfActionThe action to set or null to remove the action
-
getOnPageLostView
Returns thePdfActionfor the OnPageLostView event if there is any, or null.- Returns:
-
PdfActionor null
-
setOnPageLostView
Sets thePdfActionto perform on the OnPageLostView event, or removes it when action is null.- Parameters:
-
action-PdfActionThe action to set or null to remove the action
-
getAllKnownActions
Lists everyPdfActionfor 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 thePdfActionfor 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- thePdfActionto 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:
-
isWrappedObjectMustBeIndirectin classPdfObjectWrapper<PdfDictionary> - Returns:
- true if in the resultant document the object behind the wrapper must be indirect, otherwise false.
-