public class AnnotObject extends Object
Constructor and Description |
---|
AnnotObject() |
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(AttributeObject attr)
Adds new AttributeObject to the list of annotation attributes.
|
ActionObject |
getAction()
Gets Action element, a child of OnActivation element of the link annotation.
|
String |
getAppearance()
Gets the string value of the appearance element, a child element of stamp element.
|
AttributeObject |
getAttribute(String name)
Finds the attribute by name in attributes list.
|
List<AttributeObject> |
getAttributes()
Gets a list of all attributes of the annotation.
|
String |
getAttributeValue(String name)
Finds the attribute by name in attributes list and return its string value.
|
BorderStyleAltObject |
getBorderStyleAlt()
Gets the BorderStyleAlt element, a child of the link element.
|
PdfString |
getContents()
Gets the string value of contents tag in Xfdf document structure.
|
PdfString |
getContentsRichText()
Gets the string value of contents-richtext tag in Xfdf document structure.
|
String |
getDefaultAppearance()
Gets the string value of the defaultappearance element, a child of the caret and freetext elements.
|
String |
getDefaultStyle()
Gets the string value of the defaultstyle element, a child of the freetext element.
|
DestObject |
getDestination()
Gets Dest element, a child element of link, GoTo, GoToR elements.
|
String |
getName()
Gets the string value of the type of annotation.
|
AnnotObject |
getPopup()
Gets the popup annotation, an inner element of the annotation element.
|
PdfIndirectReference |
getRef()
Gets the reference to the source PdfAnnotation .
|
String |
getVertices()
Gets the string, containing vertices element, a child of the polygon and polyline elements.
|
boolean |
isHasPopup()
Gets the boolean, indicating if annotation has an inner popup element.
|
AnnotObject |
setAction(ActionObject action)
Sets Action element, a child of OnActivation element of the link annotation.
|
AnnotObject |
setAppearance(String appearance)
Gets the string value of the appearance element, a child element of stamp element.
|
AnnotObject |
setBorderStyleAlt(BorderStyleAltObject borderStyleAlt)
Sets the BorderStyleAlt element, a child of the link element.
|
AnnotObject |
setContents(PdfString contents)
Sets the string value of contents tag in Xfdf document structure.
|
AnnotObject |
setContentsRichText(PdfString contentsRichRext)
Sets the string value of contents-richtext tag in xfdf document structure.
|
AnnotObject |
setDefaultAppearance(String defaultAppearance)
Sets the string value of the defaultappearance element, a child of the caret and freetext elements.
|
AnnotObject |
setDefaultStyle(String defaultStyle)
Sets the string value of the defaultstyle element, a child of the freetext element.
|
AnnotObject |
setDestination(DestObject destination)
Sets Dest element, a child element of link, GoTo, GoToR elements.
|
AnnotObject |
setHasPopup(boolean hasPopup)
Sets the boolean, indicating if annotation has inner popup element.
|
AnnotObject |
setName(String name)
Sets the string value of the type of annotation.
|
AnnotObject |
setPopup(AnnotObject popup)
Sets the popup annotation, an inner element of the annotation element.
|
AnnotObject |
setRef(PdfIndirectReference ref)
Sets the reference to the source PdfAnnotation .
|
AnnotObject |
setVertices(String vertices)
Sets the string, containing vertices element, a child of the polygon and polyline elements.
|
public String getName()
XfdfConstants.CARET
, XfdfConstants.CIRCLE
, XfdfConstants.FILEATTACHMENT
, XfdfConstants.FREETEXT
, XfdfConstants.HIGHLIGHT
, XfdfConstants.INK
, XfdfConstants.LINE
, XfdfConstants.POLYGON
, XfdfConstants.POLYLINE
, XfdfConstants.SOUND
, XfdfConstants.SQUARE
, XfdfConstants.SQUIGGLY
, XfdfConstants.STAMP
, XfdfConstants.STRIKEOUT
, XfdfConstants.TEXT
, XfdfConstants.UNDERLINE
.
String
value of the type of annotation
public AnnotObject setName(String name)
XfdfConstants.CARET
, XfdfConstants.CIRCLE
, XfdfConstants.FILEATTACHMENT
, XfdfConstants.FREETEXT
, XfdfConstants.HIGHLIGHT
, XfdfConstants.INK
, XfdfConstants.LINE
, XfdfConstants.POLYGON
, XfdfConstants.POLYLINE
, XfdfConstants.SOUND
, XfdfConstants.SQUARE
, XfdfConstants.SQUIGGLY
, XfdfConstants.STAMP
, XfdfConstants.STRIKEOUT
, XfdfConstants.TEXT
, XfdfConstants.UNDERLINE
.
name
- String
value of the type of annotation
annotation object
with set name
public List<AttributeObject> getAttributes()
list
containing all attribute objects
of the annotation
public AttributeObject getAttribute(String name)
name
- The name of the attribute to look for.
AttributeObject
with the given name, or null, if no object with this name was found.
public String getAttributeValue(String name)
name
- The name of the attribute to look for.
AttributeObject
with the given name, or null, if no object with this name was found.
public AnnotObject getPopup()
AnnotObject
representing the inner popup annotation
public AnnotObject setPopup(AnnotObject popup)
popup
- annotation object
representing inner popup annotation
annotation object
public boolean isHasPopup()
public AnnotObject setHasPopup(boolean hasPopup)
hasPopup
- a boolean indicating if annotation has inner popup element
annotation object
public PdfString getContents()
PdfString
value of inner contents element of current annotation object
public AnnotObject setContents(PdfString contents)
contents
- string
value of inner contents element
annotation object
public PdfString getContentsRichText()
PdfString
value of inner contents-richtext element of current annotation object
public AnnotObject setContentsRichText(PdfString contentsRichRext)
contentsRichRext
- rich text string
value of inner contents-richtext element
annotation object
public ActionObject getAction()
action object
of annotation object
public AnnotObject setAction(ActionObject action)
action
- action object
, an inner element of annotation object
annotation object
public void addAttribute(AttributeObject attr)
AttributeObject
to the list of annotation attributes.
attr
- attribute to be added.
public DestObject getDestination()
destination object
of annotation object
public AnnotObject setDestination(DestObject destination)
destination
- destination object
, an inner element of annotation object
annotation object
public String getAppearance()
String
value of inner appearance element
public AnnotObject setAppearance(String appearance)
appearance
- String
value of inner appearance element of annotation object
annotation object
public String getDefaultAppearance()
String
value of inner deafultappearance element
public AnnotObject setDefaultAppearance(String defaultAppearance)
defaultAppearance
- String
value of inner defaultappearance element of annotation object
annotation object
public String getDefaultStyle()
String
value of inner defaultstyle element
public AnnotObject setDefaultStyle(String defaultStyle)
defaultStyle
- String
value of inner defaultstyle element of annotation object
annotation object
public BorderStyleAltObject getBorderStyleAlt()
BorderStyleAlt object
public AnnotObject setBorderStyleAlt(BorderStyleAltObject borderStyleAlt)
borderStyleAlt
- inner BorderStyleAlt object
annotation object
public String getVertices()
String
value of inner vertices element
public AnnotObject setVertices(String vertices)
vertices
- String
value of inner vertices element
annotation object
public PdfIndirectReference getRef()
PdfAnnotation
. Used for attaching popups in case of reading data from pdf file.
PdfIndirectReference
of the source annotation object.
public AnnotObject setRef(PdfIndirectReference ref)
PdfAnnotation
. Used for attaching popups in case of reading data from pdf file.
ref
- PdfIndirectReference
of the source annotation object.
AnnotObject
instance.
Copyright © 1998–2021 iText Group NV. All rights reserved.