public class PdfWidgetAnnotation extends PdfAnnotation
Modifier and Type | Field and Description |
---|---|
static int |
HIDDEN |
static int |
HIDDEN_BUT_PRINTABLE |
static int |
VISIBLE |
static int |
VISIBLE_BUT_DOES_NOT_PRINT |
Accepted, Canceled, Completed, HIGHLIGHT_INVERT, HIGHLIGHT_NONE, HIGHLIGHT_OUTLINE, HIGHLIGHT_PUSH, HIGHLIGHT_TOGGLE, INVISIBLE, LOCKED, LOCKED_CONTENTS, Marked, MarkedModel, NO_ROTATE, NO_VIEW, NO_ZOOM, None, page, PRINT, READ_ONLY, Rejected, ReviewModel, STYLE_BEVELED, STYLE_DASHED, STYLE_INSET, STYLE_SOLID, STYLE_UNDERLINE, TOGGLE_NO_VIEW, Unmarked
Constructor and Description |
---|
PdfWidgetAnnotation(PdfDictionary pdfObject)
Deprecated.
Use
PdfAnnotation.makeAnnotation(PdfObject) instead. Will be made protected in 7.1
|
PdfWidgetAnnotation(Rectangle rect) |
Modifier and Type | Method and Description |
---|---|
PdfDictionary |
getAction()
An PdfAction to perform, such as launching an application, playing a sound, changing an annotation’s appearance state etc, when the annotation is activated.
|
PdfDictionary |
getAdditionalAction()
An additional actions dictionary that extends the set of events that can trigger the execution of an action.
|
PdfDictionary |
getAppearanceCharacteristics()
An appearance characteristics dictionary containing additional information for constructing the annotation’s appearance stream.
|
PdfDictionary |
getBorderStyle()
The dictionaries for some annotation types (such as free text and polygon annotations) can include the BS entry.
|
PdfName |
getHighlightMode()
Getter for the annotation's highlighting mode.
|
PdfName |
getSubtype()
Gets a PdfName which value is a subtype of this annotation.
|
void |
releaseFormFieldFromWidgetAnnotation()
This method removes all widget annotation entries from the form field the given annotation merged with.
|
PdfWidgetAnnotation |
setAction(PdfAction action)
Sets a PdfAction to this annotation which will be performed when the annotation is activated.
|
PdfWidgetAnnotation |
setAdditionalAction(PdfName key, PdfAction action)
Sets an additional PdfAction to this annotation which will be performed in response to the specific trigger event defined by key .
|
PdfWidgetAnnotation |
setAppearanceCharacteristics(PdfDictionary characteristics)
Sets an appearance characteristics dictionary containing additional information for constructing the annotation’s appearance stream.
|
PdfWidgetAnnotation |
setBorderStyle(PdfDictionary borderStyle)
Sets border style dictionary that has more settings than the array specified for the Border entry ( PdfAnnotation.getBorder() ).
|
PdfWidgetAnnotation |
setBorderStyle(PdfName style)
Setter for the annotation's preset border style.
|
PdfWidgetAnnotation |
setDashPattern(PdfArray dashPattern)
Setter for the annotation's preset dashed border style.
|
PdfWidgetAnnotation |
setHighlightMode(PdfName mode)
Setter for the annotation's highlighting mode.
|
PdfWidgetAnnotation |
setParent(PdfObject parent) |
PdfWidgetAnnotation |
setVisibility(int visibility)
Set the visibility flags of the Widget annotation Options are: HIDDEN, HIDDEN_BUT_PRINTABLE, VISIBLE, VISIBLE_BUT_DOES_NOT_PRINT
|
flush, getAppearanceDictionary, getAppearanceObject, getAppearanceState, getBorder, getColorObject, getContents, getDate, getDownAppearanceObject, getFlags, getName, getNormalAppearanceObject, getOpen, getPage, getPageObject, getQuadPoints, getRectangle, getRolloverAppearanceObject, getStructParentIndex, getTitle, hasFlag, isWrappedObjectMustBeIndirect, makeAnnotation, makeAnnotation, put, remove, resetFlag, setAppearance, setAppearance, setAppearanceState, setBorder, setColor, setColor, setColor, setContents, setContents, setDate, setDownAppearance, setDownAppearance, setFlag, setFlags, setLayer, setName, setNormalAppearance, setNormalAppearance, setOpen, setPage, setQuadPoints, setRectangle, setRolloverAppearance, setRolloverAppearance, setStructParentIndex, setTitle
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
public static final int HIDDEN
public static final int VISIBLE_BUT_DOES_NOT_PRINT
public static final int HIDDEN_BUT_PRINTABLE
public static final int VISIBLE
public PdfWidgetAnnotation(Rectangle rect)
@Deprecated public PdfWidgetAnnotation(PdfDictionary pdfObject)
PdfAnnotation.makeAnnotation(PdfObject)
instead. Will be made protected in 7.1
pdfObject
- object representing this annotation
public PdfName getSubtype()
PdfAnnotation
PdfName
which value is a subtype of this annotation. See ISO-320001 12.5.6, "Annotation Types" for the reference to the possible types.
getSubtype
in class PdfAnnotation
public PdfWidgetAnnotation setParent(PdfObject parent)
public PdfWidgetAnnotation setHighlightMode(PdfName mode)
PdfAnnotation.HIGHLIGHT_NONE
- No highlighting.PdfAnnotation.HIGHLIGHT_INVERT
- Invert the contents of the annotation rectangle.PdfAnnotation.HIGHLIGHT_OUTLINE
- Invert the annotation's border.PdfAnnotation.HIGHLIGHT_PUSH
- Display the annotation?s down appearance, if any.PdfAnnotation.HIGHLIGHT_TOGGLE
- Same as P.mode
- The new value for the annotation's highlighting mode.
public PdfName getHighlightMode()
public void releaseFormFieldFromWidgetAnnotation()
public PdfWidgetAnnotation setVisibility(int visibility)
visibility
- visibility option
public PdfDictionary getAction()
PdfAction
to perform, such as launching an application, playing a sound, changing an annotation’s appearance state etc, when the annotation is activated.
getAction
in class PdfAnnotation
PdfDictionary
which defines the characteristics and behaviour of an action.
public PdfWidgetAnnotation setAction(PdfAction action)
PdfAction
to this annotation which will be performed when the annotation is activated.
setAction
in class PdfAnnotation
action
- PdfAction
to set to this annotation.
PdfWidgetAnnotation
instance.
public PdfDictionary getAdditionalAction()
getAdditionalAction
in class PdfAnnotation
PdfDictionary
.
getAction()
public PdfWidgetAnnotation setAdditionalAction(PdfName key, PdfAction action)
PdfAction
to this annotation which will be performed in response to the specific trigger event defined by key
. See ISO-320001 12.6.3, "Trigger Events".
setAdditionalAction
in class PdfAnnotation
key
- a PdfName
that denotes a type of the additional action to set.
action
- PdfAction
to set as additional to this annotation.
PdfWidgetAnnotation
instance.
public PdfDictionary getAppearanceCharacteristics()
getAppearanceCharacteristics
in class PdfAnnotation
public PdfWidgetAnnotation setAppearanceCharacteristics(PdfDictionary characteristics)
setAppearanceCharacteristics
in class PdfAnnotation
characteristics
- the PdfDictionary
with additional information for appearance stream.
PdfWidgetAnnotation
instance.
public PdfDictionary getBorderStyle()
PdfAnnotation.getBorder()
). If an annotation dictionary includes the BS entry, then the Border entry is ignored. If annotation includes AP (see PdfAnnotation.getAppearanceDictionary()
) it takes precedence over the BS entry. For more info on BS entry see ISO-320001, Table 166.
getBorderStyle
in class PdfAnnotation
PdfDictionary
which is a border style dictionary or null if it is not specified.
public PdfWidgetAnnotation setBorderStyle(PdfDictionary borderStyle)
PdfAnnotation.getBorder()
). See ISO-320001, Table 166 and getBorderStyle()
for more info.
setBorderStyle
in class PdfAnnotation
borderStyle
- a border style dictionary specifying the line width and dash pattern that shall be used in drawing the annotation’s border.
PdfWidgetAnnotation
instance.
public PdfWidgetAnnotation setBorderStyle(PdfName style)
PdfAnnotation.STYLE_SOLID
- A solid rectangle surrounding the annotation.PdfAnnotation.STYLE_DASHED
- A dashed rectangle surrounding the annotation.PdfAnnotation.STYLE_BEVELED
- A simulated embossed rectangle that appears to be raised above the surface of the page.PdfAnnotation.STYLE_INSET
- A simulated engraved rectangle that appears to be recessed below the surface of the page.PdfAnnotation.STYLE_UNDERLINE
- A single line along the bottom of the annotation rectangle.setBorderStyle
in class PdfAnnotation
style
- The new value for the annotation's border style.
PdfWidgetAnnotation
instance.
getBorderStyle()
public PdfWidgetAnnotation setDashPattern(PdfArray dashPattern)
PdfAnnotation.STYLE_DASHED
style was used for the annotation border style (see setBorderStyle(PdfName)
. See ISO-320001 8.4.3.6, “Line Dash Pattern” for the format in which dash pattern shall be specified.
setDashPattern
in class PdfAnnotation
dashPattern
- a dash array defining a pattern of dashes and gaps that shall be used in drawing a dashed border.
PdfWidgetAnnotation
instance.
Copyright © 1998–2018 iText Group NV. All rights reserved.