PDF Clown
0.0.8

it.stefanochizzolini.clown.documents.interaction.annotations
Class Annotation

java.lang.Object
  extended by it.stefanochizzolini.clown.objects.PdfObjectWrapper<PdfDictionary>
      extended by it.stefanochizzolini.clown.documents.interaction.annotations.Annotation
Direct Known Subclasses:
CalloutNote, Caret, FileAttachment, Line, Link, MovieAnnotation, Note, Popup, RubberStamp, Scribble, Shape, SoundAnnotation, TextMarkup, Widget

public class Annotation
extends PdfObjectWrapper<PdfDictionary>

Annotation [PDF:1.6:8.4].

Since:
0.0.7
Version:
0.0.8
Author:
Stefano Chizzolini (http://www.stefanochizzolini.it)

Nested Class Summary
static class Annotation.FlagsEnum
          Field flags [PDF:1.6:8.4.2].
 
Constructor Summary
protected Annotation(Document context, PdfName subtype, Rectangle2D box, Page page)
           
protected Annotation(PdfDirectObject baseObject, PdfIndirectObject container)
           
 
Method Summary
 Annotation clone(Document context)
          Gets a clone of the object, registered inside the given document context.
 Action getAction()
          Gets the action to be performed when the annotation is activated.
 AnnotationActions getActions()
          Gets the annotation's behavior in response to various trigger events.
 Appearance getAppearance()
          Gets the appearance specifying how the annotation is presented visually on the page.
 Border getBorder()
          Gets the border style.
 Rectangle2D getBox()
          Gets the annotation rectangle.
 EnumSet<Annotation.FlagsEnum> getFlags()
          Gets the annotation flags.
 Date getModificationDate()
          Gets the date and time when the annotation was most recently modified.
 String getName()
          Gets the annotation name.
 Page getPage()
          Gets the associated page.
 String getText()
          Gets the annotation text.
 boolean isPrintable()
          Gets whether to print the annotation when the page is printed.
 boolean isVisible()
          Gets whether the annotation is visible.
 void setAction(Action value)
           
 void setActions(AnnotationActions value)
           
 void setAppearance(Appearance value)
           
 void setBorder(Border value)
           
 void setBox(Rectangle2D value)
           
 void setFlags(EnumSet<Annotation.FlagsEnum> value)
           
 void setModificationDate(Date value)
           
 void setName(String value)
           
 void setPage(Page value)
           
 void setPrintable(boolean value)
           
 void setText(String value)
           
 void setVisible(boolean value)
           
static Annotation wrap(PdfDirectObject baseObject, PdfIndirectObject container)
          Wraps an annotation base object into an annotation object.
static Annotation wrap(PdfReference reference)
          Wraps an annotation reference into an annotation object.
 
Methods inherited from class it.stefanochizzolini.clown.objects.PdfObjectWrapper
delete, getBaseDataObject, getBaseObject, getContainer, getDocument, getFile, setBaseObject, setContainer, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Annotation

protected Annotation(Document context,
                     PdfName subtype,
                     Rectangle2D box,
                     Page page)

Annotation

protected Annotation(PdfDirectObject baseObject,
                     PdfIndirectObject container)
Method Detail

wrap

public static final Annotation wrap(PdfReference reference)
Wraps an annotation reference into an annotation object.

Parameters:
reference - Reference to an annotation object.
Returns:
Annotation object associated to the reference.

wrap

public static final Annotation wrap(PdfDirectObject baseObject,
                                    PdfIndirectObject container)
Wraps an annotation base object into an annotation object.

Parameters:
baseObject - Annotation base object.
container - Annotation base object container.
Returns:
Annotation object associated to the base object.

clone

public Annotation clone(Document context)
Description copied from class: PdfObjectWrapper
Gets a clone of the object, registered inside the given document context.

Specified by:
clone in class PdfObjectWrapper<PdfDictionary>
Parameters:
context - Which document the clone has to be registered in.

getAction

public Action getAction()
Gets the action to be performed when the annotation is activated.

Since:
0.0.8

getActions

public AnnotationActions getActions()
Gets the annotation's behavior in response to various trigger events.


getAppearance

public Appearance getAppearance()
Gets the appearance specifying how the annotation is presented visually on the page.


getBorder

public Border getBorder()
Gets the border style.


getBox

public Rectangle2D getBox()
Gets the annotation rectangle.


getFlags

public EnumSet<Annotation.FlagsEnum> getFlags()
Gets the annotation flags.


getModificationDate

public Date getModificationDate()
Gets the date and time when the annotation was most recently modified.


getName

public String getName()
Gets the annotation name.

Remarks

The annotation name uniquely identifies the annotation among all the annotations on its page.


getPage

public Page getPage()
Gets the associated page.


getText

public String getText()
Gets the annotation text.

Remarks

Depending on the annotation type, the text may be either directly displayed or (in case of non-textual annotations) used as alternate description.


isPrintable

public boolean isPrintable()
Gets whether to print the annotation when the page is printed.


isVisible

public boolean isVisible()
Gets whether the annotation is visible.


setAction

public void setAction(Action value)
See Also:
getAction()

setActions

public void setActions(AnnotationActions value)
See Also:
getActions()

setAppearance

public void setAppearance(Appearance value)
See Also:
getAppearance()

setBorder

public void setBorder(Border value)
See Also:
getBorder()

setBox

public void setBox(Rectangle2D value)
See Also:
getBox()

setFlags

public void setFlags(EnumSet<Annotation.FlagsEnum> value)
See Also:
getFlags()

setModificationDate

public void setModificationDate(Date value)
See Also:
getModificationDate()

setName

public void setName(String value)
See Also:
getName()

setPage

public void setPage(Page value)
See Also:
getPage()

setPrintable

public void setPrintable(boolean value)
See Also:
isPrintable()

setText

public void setText(String value)
See Also:
getText()

setVisible

public void setVisible(boolean value)
See Also:
isVisible()

PDF Clown
0.0.8

Project home page

Copyright © 2006-2010 Stefano Chizzolini. Some Rights Reserved.
This documentation is available under the terms of the GNU Free Documentation License.