com.spire.pdf.annotations
Class PdfAnnotation

java.lang.Object
  extended by com.spire.pdf.annotations.PdfAnnotation
All Implemented Interfaces:
IPdfWrapper
Direct Known Subclasses:
PdfAnnotationWidget, PdfFileAnnotation, PdfFreeTextAnnotation, PdfLineAnnotation, PdfLinkAnnotation, PdfPolygonAnnotation, PdfPopupAnnotation, PdfRubberStampAnnotation, PdfTextMarkupAnnotation

public abstract class PdfAnnotation
extends java.lang.Object
implements IPdfWrapper

Represents the base class for annotation objects.


Constructor Summary
  PdfAnnotation()
           
  PdfAnnotation(PdfDictionary dictionary)
          Creates new annotation object with the specified dictionary.
protected PdfAnnotation(PdfPageBase page, java.lang.String text)
           
protected PdfAnnotation(com.spire.ms.System.Drawing.RectangleF bounds)
           
 
Method Summary
 PdfAnnotationBorder getBorder()
           
 PdfRGBColor getColor()
          Gets the background of the annotations icon when closed.
 PdfDictionary getDictionary()
          Gets the dictionary.
 PdfAnnotationFlags getFlags()
          Gets annotation flags.
 java.awt.geom.Point2D getLocation()
          Gets location of the annotation.
 java.util.Date getModifiedDate()
          Gets annotation's modified date.
 java.lang.String getName()
          Gets the name of the annotation.
 PdfPageBase getPage()
          Gets a page which this annotation is connected to.
 java.awt.geom.Rectangle2D getRectangle()
          Gets annotation's bounds.
 java.lang.String getText()
          Gets content of the annotation.
 void setBorder(PdfAnnotationBorder value)
          Sets annotation's border.
 void setColor(PdfRGBColor value)
          Sets the background of the annotations icon when closed.
 void setDictionary(PdfDictionary value)
          Sets the dictionary.
 void setFlags(PdfAnnotationFlags value)
          Sets annotation flags.
 void setModifiedDate(java.util.Date value)
          Sets annotation's modified date.
 void setName(java.lang.String value)
          Sets the name of the annotation.
 void setRectangle(java.awt.geom.Rectangle2D value)
          Sets annotation's bounds.
 void setText(java.lang.String value)
          Sets content of the annotation.
 

Constructor Detail

PdfAnnotation

public PdfAnnotation()

PdfAnnotation

public PdfAnnotation(PdfDictionary dictionary)
Creates new annotation object with the specified dictionary.

Parameters:
dictionary - Annotation's dictionary

PdfAnnotation

protected PdfAnnotation(PdfPageBase page,
                        java.lang.String text)

PdfAnnotation

protected PdfAnnotation(com.spire.ms.System.Drawing.RectangleF bounds)
Method Detail

getColor

public PdfRGBColor getColor()
Gets the background of the annotations icon when closed. The title bar of the annotations pop-up window. The border of a link annotation.


setColor

public void setColor(PdfRGBColor value)
Sets the background of the annotations icon when closed. The title bar of the annotations pop-up window. The border of a link annotation.


getModifiedDate

public java.util.Date getModifiedDate()
Gets annotation's modified date.


setModifiedDate

public void setModifiedDate(java.util.Date value)
Sets annotation's modified date.


getBorder

public PdfAnnotationBorder getBorder()

setBorder

public void setBorder(PdfAnnotationBorder value)
Sets annotation's border.


getRectangle

public java.awt.geom.Rectangle2D getRectangle()
Gets annotation's bounds. If this property is not set bounds are calculated automatically based on Location property and content of annotation.


setRectangle

public void setRectangle(java.awt.geom.Rectangle2D value)
Sets annotation's bounds. If this property is not set bounds are calculated automatically based on Location property and content of annotation.


getLocation

public java.awt.geom.Point2D getLocation()
Gets location of the annotation.


getName

public java.lang.String getName()
Gets the name of the annotation.

Returns:
Note: The annotation name, a text string uniquely identifying it among all the annotations on its page.

setName

public void setName(java.lang.String value)
Sets the name of the annotation.


getPage

public PdfPageBase getPage()
Gets a page which this annotation is connected to.


getText

public java.lang.String getText()
Gets content of the annotation.


setText

public void setText(java.lang.String value)
Sets content of the annotation.


getFlags

public PdfAnnotationFlags getFlags()
Gets annotation flags.


setFlags

public void setFlags(PdfAnnotationFlags value)
Sets annotation flags.


getDictionary

public PdfDictionary getDictionary()
Gets the dictionary.


setDictionary

public void setDictionary(PdfDictionary value)
Sets the dictionary.

Parameters:
value - The dictionary.