Module org.sejda.sambox
Class PDAnnotationWidget
java.lang.Object
org.sejda.sambox.pdmodel.common.PDDictionaryWrapper
org.sejda.sambox.pdmodel.interactive.annotation.PDAnnotation
org.sejda.sambox.pdmodel.interactive.annotation.PDAnnotationWidget
- All Implemented Interfaces:
COSObjectable
This is the class that represents a widget.
- Author:
- Ben Litchfield
-
Field Summary
Fields inherited from class org.sejda.sambox.pdmodel.interactive.annotation.PDAnnotation
FLAG_HIDDEN, FLAG_INVISIBLE, FLAG_LOCKED, FLAG_NO_ROTATE, FLAG_NO_VIEW, FLAG_NO_ZOOM, FLAG_PRINTED, FLAG_READ_ONLY, FLAG_TOGGLE_NO_VIEW -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the action to be performed when this annotation is to be activated.Get the additional actions for this field.Returns the appearance characteristics dictionary.This will retrieve the border style dictionary, specifying the width and dash pattern used in drawing the line.Returns the highlighting mode.voidSet the annotation action.voidsetActions(PDAnnotationAdditionalActions actions) Set the actions of the field.voidsetAppearanceCharacteristics(PDAppearanceCharacteristicsDictionary appearanceCharacteristics) Sets the appearance characteristics dictionary.voidThis will set the border style dictionary, specifying the width and dash pattern used in drawing the line.voidsetHighlightingMode(String highlightingMode) Sets the highlighting mode.Methods inherited from class org.sejda.sambox.pdmodel.interactive.annotation.PDAnnotation
constructAppearances, createAnnotation, createAnnotation, getAnnotationFlags, getAnnotationName, getAppearance, getAppearanceState, getBorder, getColor, getColor, getContents, getModifiedDate, getNormalAppearanceStream, getOptionalContent, getPage, getRectangle, getStructParent, getSubtype, isHidden, isInvisible, isLocked, isLockedContents, isNoRotate, isNoView, isNoZoom, isPrinted, isReadOnly, isToggleNoView, setAnnotationFlags, setAnnotationName, setAppearance, setAppearanceState, setBorder, setColor, setContents, setHidden, setInvisible, setLocked, setLockedContents, setModifiedDate, setModifiedDate, setNoRotate, setNoView, setNoZoom, setOptionalContent, setPage, setPrinted, setReadOnly, setRectangle, setStructParent, setToggleNoViewMethods inherited from class org.sejda.sambox.pdmodel.common.PDDictionaryWrapper
equals, getCOSObject, hashCode
-
Constructor Details
-
PDAnnotationWidget
public PDAnnotationWidget() -
PDAnnotationWidget
-
-
Method Details
-
getHighlightingMode
Returns the highlighting mode. Default value:IN- (None) No highlighting.
I- (Invert) Invert the contents of the annotation rectangle.
O- (Outline) Invert the annotation's border.
P- (Push) Display the annotation's down appearance, if any. If no down appearance is defined, the contents of the annotation rectangle shall be offset to appear as if it were pushed below the surface of the page
T- (Toggle) Same as
P(which is preferred).
- Returns:
- the highlighting mode
-
setHighlightingMode
Sets the highlighting mode.N- (None) No highlighting.
I- (Invert) Invert the contents of the annotation rectangle.
O- (Outline) Invert the annotation's border.
P- (Push) Display the annotation's down appearance, if any. If no down appearance is defined, the contents of the annotation rectangle shall be offset to appear as if it were pushed below the surface of the page
T- (Toggle) Same as
P(which is preferred).
- Parameters:
highlightingMode- the highlighting mode the defined values
-
getAppearanceCharacteristics
Returns the appearance characteristics dictionary.- Returns:
- the appearance characteristics dictionary
-
setAppearanceCharacteristics
public void setAppearanceCharacteristics(PDAppearanceCharacteristicsDictionary appearanceCharacteristics) Sets the appearance characteristics dictionary.- Parameters:
appearanceCharacteristics- the appearance characteristics dictionary
-
getAction
Get the action to be performed when this annotation is to be activated.- Returns:
- The action to be performed when this annotation is activated.
-
setAction
Set the annotation action. As of PDF 1.6 this is only used for Widget Annotations- Parameters:
action- The annotation action.
-
getActions
Get the additional actions for this field. This will return null if there are no additional actions for this field. As of PDF 1.6 this is only used for Widget Annotations.- Returns:
- The actions of the field.
-
setActions
Set the actions of the field.- Parameters:
actions- The field actions.
-
setBorderStyle
This will set the border style dictionary, specifying the width and dash pattern used in drawing the line.- Parameters:
bs- the border style dictionary to set.
-
getBorderStyle
This will retrieve the border style dictionary, specifying the width and dash pattern used in drawing the line.- Returns:
- the border style dictionary.
-