org.apache.pdfbox.pdmodel.interactive.annotation
Class PDAnnotationMarkup

java.lang.Object
  extended by org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation
      extended by org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup
All Implemented Interfaces:
COSObjectable
Direct Known Subclasses:
PDAnnotationFileAttachment, PDAnnotationLine, PDAnnotationRubberStamp, PDAnnotationSquareCircle, PDAnnotationText, PDAnnotationTextMarkup

public class PDAnnotationMarkup
extends PDAnnotation

This class represents the additonal fields of a Markup type Annotation. See section 12.5.6 of ISO32000-1:2008 (starting with page 390) for details on annotation types.

Version:
$Revision: 1.1 $
Author:
Paul King

Field Summary
static String RT_GROUP
          Constant for an annotation reply type.
static String RT_REPLY
          Constant for an annotation reply type.
static String SUB_TYPE_CARET
          Constant for an Caret type of annotation.
static String SUB_TYPE_FREETEXT
          Constant for a FreeText type of annotation.
static String SUB_TYPE_INK
          Constant for an Ink type of annotation.
static String SUB_TYPE_POLYGON
          Constant for an Polygon type of annotation.
static String SUB_TYPE_POLYLINE
          Constant for an PolyLine type of annotation.
static String SUB_TYPE_SOUND
          Constant for an Sound type of annotation.
 
Fields inherited from class org.apache.pdfbox.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
PDAnnotationMarkup()
          Constructor.
PDAnnotationMarkup(COSDictionary dict)
          Constructor.
 
Method Summary
 float getConstantOpacity()
          This will retrieve the constant opacity value used when rendering the annotation (excluing any popup).
 Calendar getCreationDate()
          This will retrieve the date and time the annotation was created.
 PDExternalDataDictionary getExternalData()
          This will return the external data dictionary.
 PDAnnotation getInReplyTo()
          This will retrieve the annotation to which this one is "In Reply To" the actual relationship is specified by the RT entry.
 String getIntent()
          This will retrieve the intent of the annotation The values and meanings are specific to the actual annotation See the IT_* constants for the annotation classes.
 PDAnnotationPopup getPopup()
          This will retrieve the popup annotation used for entering/editing the text for this annotation.
 String getReplyType()
          This will retrieve the Reply Type (relationship) with the annotation in the IRT entry See the RT_* constants for the available values.
 PDTextStream getRichContents()
          This will retrieve the rich text stream which is displayed in the popup window.
 String getSubject()
          This will retrieve the short description of the subject of the annotation.
 String getTitlePopup()
          Retrieve the string used as the title of the popup window shown when open and active (by convention this identifies who added the annotation).
 void setConstantOpacity(float ca)
          This will set the constant opacity value used when rendering the annotation (excluing any popup).
 void setCreationDate(Calendar creationDate)
          This will set the the date and time the annotation was created.
 void setExternalData(PDExternalDataDictionary externalData)
          This will set the external data dictionary.
 void setInReplyTo(PDAnnotation irt)
          This will set the annotation to which this one is "In Reply To" the actual relationship is specified by the RT entry.
 void setIntent(String it)
          This will set the intent of the annotation The values and meanings are specific to the actual annotation See the IT_* constants for the annotation classes.
 void setPopup(PDAnnotationPopup popup)
          This will set the popup annotation used for entering/editing the text for this annotation.
 void setReplyType(String rt)
          This will set the Reply Type (relationship) with the annotation in the IRT entry See the RT_* constants for the available values.
 void setRichContents(PDTextStream rc)
          This will set the rich text stream which is displayed in the popup window.
 void setSubject(String subj)
          This will set the short description of the subject of the annotation.
 void setTitlePopup(String t)
          Set the string used as the title of the popup window shown when open and active (by convention this identifies who added the annotation).
 
Methods inherited from class org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation
createAnnotation, getAnnotationFlags, getAnnotationName, getAppearance, getAppearanceStream, getColour, getContents, getCOSObject, getDictionary, getModifiedDate, getPage, getRectangle, getStructParent, getSubtype, isHidden, isInvisible, isLocked, isNoRotate, isNoView, isNoZoom, isPrinted, isReadOnly, isToggleNoView, setAnnotationFlags, setAnnotationName, setAppearance, setAppearanceStream, setColour, setContents, setHidden, setInvisible, setLocked, setModifiedDate, setNoRotate, setNoView, setNoZoom, setPage, setPrinted, setReadOnly, setRectangle, setStructParent, setToggleNoView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUB_TYPE_FREETEXT

public static final String SUB_TYPE_FREETEXT
Constant for a FreeText type of annotation.

See Also:
Constant Field Values

SUB_TYPE_POLYGON

public static final String SUB_TYPE_POLYGON
Constant for an Polygon type of annotation.

See Also:
Constant Field Values

SUB_TYPE_POLYLINE

public static final String SUB_TYPE_POLYLINE
Constant for an PolyLine type of annotation.

See Also:
Constant Field Values

SUB_TYPE_CARET

public static final String SUB_TYPE_CARET
Constant for an Caret type of annotation.

See Also:
Constant Field Values

SUB_TYPE_INK

public static final String SUB_TYPE_INK
Constant for an Ink type of annotation.

See Also:
Constant Field Values

SUB_TYPE_SOUND

public static final String SUB_TYPE_SOUND
Constant for an Sound type of annotation.

See Also:
Constant Field Values

RT_REPLY

public static final String RT_REPLY
Constant for an annotation reply type.

See Also:
Constant Field Values

RT_GROUP

public static final String RT_GROUP
Constant for an annotation reply type.

See Also:
Constant Field Values
Constructor Detail

PDAnnotationMarkup

public PDAnnotationMarkup()
Constructor.


PDAnnotationMarkup

public PDAnnotationMarkup(COSDictionary dict)
Constructor.

Parameters:
dict - The annotations dictionary.
Method Detail

getTitlePopup

public String getTitlePopup()
Retrieve the string used as the title of the popup window shown when open and active (by convention this identifies who added the annotation).

Returns:
The title of the popup.

setTitlePopup

public void setTitlePopup(String t)
Set the string used as the title of the popup window shown when open and active (by convention this identifies who added the annotation).

Parameters:
t - The title of the popup.

getPopup

public PDAnnotationPopup getPopup()
This will retrieve the popup annotation used for entering/editing the text for this annotation.

Returns:
the popup annotation.

setPopup

public void setPopup(PDAnnotationPopup popup)
This will set the popup annotation used for entering/editing the text for this annotation.

Parameters:
popup - the popup annotation.

getConstantOpacity

public float getConstantOpacity()
This will retrieve the constant opacity value used when rendering the annotation (excluing any popup).

Returns:
the constant opacity value.

setConstantOpacity

public void setConstantOpacity(float ca)
This will set the constant opacity value used when rendering the annotation (excluing any popup).

Parameters:
ca - the constant opacity value.

getRichContents

public PDTextStream getRichContents()
This will retrieve the rich text stream which is displayed in the popup window.

Returns:
the rich text stream.

setRichContents

public void setRichContents(PDTextStream rc)
This will set the rich text stream which is displayed in the popup window.

Parameters:
rc - the rich text stream.

getCreationDate

public Calendar getCreationDate()
                         throws IOException
This will retrieve the date and time the annotation was created.

Returns:
the creation date/time.
Throws:
IOException - if there is a format problem when converting the date.

setCreationDate

public void setCreationDate(Calendar creationDate)
This will set the the date and time the annotation was created.

Parameters:
creationDate - the date and time the annotation was created.

getInReplyTo

public PDAnnotation getInReplyTo()
                          throws IOException
This will retrieve the annotation to which this one is "In Reply To" the actual relationship is specified by the RT entry.

Returns:
the other annotation.
Throws:
IOException - if there is an error with the annotation.

setInReplyTo

public void setInReplyTo(PDAnnotation irt)
This will set the annotation to which this one is "In Reply To" the actual relationship is specified by the RT entry.

Parameters:
irt - the annotation this one is "In Reply To".

getSubject

public String getSubject()
This will retrieve the short description of the subject of the annotation.

Returns:
the subject.

setSubject

public void setSubject(String subj)
This will set the short description of the subject of the annotation.

Parameters:
subj - short description of the subject.

getReplyType

public String getReplyType()
This will retrieve the Reply Type (relationship) with the annotation in the IRT entry See the RT_* constants for the available values.

Returns:
the relationship.

setReplyType

public void setReplyType(String rt)
This will set the Reply Type (relationship) with the annotation in the IRT entry See the RT_* constants for the available values.

Parameters:
rt - the reply type.

getIntent

public String getIntent()
This will retrieve the intent of the annotation The values and meanings are specific to the actual annotation See the IT_* constants for the annotation classes.

Returns:
the intent

setIntent

public void setIntent(String it)
This will set the intent of the annotation The values and meanings are specific to the actual annotation See the IT_* constants for the annotation classes.

Parameters:
it - the intent

getExternalData

public PDExternalDataDictionary getExternalData()
This will return the external data dictionary.

Returns:
the external data dictionary

setExternalData

public void setExternalData(PDExternalDataDictionary externalData)
This will set the external data dictionary.

Parameters:
externalData - the external data dictionary


Copyright © 2002-2015 The Apache Software Foundation. All Rights Reserved.