PDF Clown
0.1.2

org.pdfclown.documents.interaction.annotations
Class Annotation

java.lang.Object
  extended by org.pdfclown.objects.PdfObjectWrapper<PdfDictionary>
      extended by org.pdfclown.documents.interaction.annotations.Annotation
All Implemented Interfaces:
Cloneable, ILayerable, IPdfObjectWrapper
Direct Known Subclasses:
CalloutNote, Caret, FileAttachment, Line, Link, Movie, Note, Popup, RubberStamp, Screen, Scribble, Shape, Sound, TextMarkup, Widget

@PDF(value=PDF10)
public class Annotation
extends PdfObjectWrapper<PdfDictionary>
implements ILayerable

Annotation [PDF:1.6:8.4].

Since:
0.0.7
Version:
0.1.2, 12/28/12
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(Page page, PdfName subtype, Rectangle2D box, String text)
           
protected Annotation(PdfDirectObject baseObject)
           
 
Method Summary
 Annotation clone(Document context)
          Gets a clone of the object, registered inside the given document context.
 boolean delete()
          Deletes this annotation removing also its reference on the page.
 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 location of the annotation on the page in default user space units.
 DeviceColor getColor()
          Gets the annotation color.
 EnumSet<Annotation.FlagsEnum> getFlags()
          Gets the annotation flags.
 LayerEntity getLayer()
          Gets the layer entity associated to this object.
 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 setColor(DeviceColor value)
           
 void setFlags(EnumSet<Annotation.FlagsEnum> value)
           
 void setLayer(LayerEntity value)
           
 void setModificationDate(Date value)
           
 void setName(String value)
           
 void setPrintable(boolean value)
           
 void setText(String value)
           
 void setVisible(boolean value)
           
static Annotation wrap(PdfDirectObject baseObject)
          Wraps an annotation base object into an annotation object.
 
Methods inherited from class org.pdfclown.objects.PdfObjectWrapper
checkCompatibility, equals, exists, getBaseDataObject, getBaseObject, getBaseObject, getContainer, getDataContainer, getDocument, getFile, getMetadata, retrieveName, retrieveNamedBaseObject, setBaseObject, setMetadata
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Annotation

protected Annotation(Page page,
                     PdfName subtype,
                     Rectangle2D box,
                     String text)

Annotation

protected Annotation(PdfDirectObject baseObject)
Method Detail

wrap

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

Parameters:
baseObject - Annotation base object.
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.

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

delete

public boolean delete()
Deletes this annotation removing also its reference on the page.

Overrides:
delete in class PdfObjectWrapper<PdfDictionary>
Returns:
Whether the object was actually decontextualized (only indirect objects can be decontextualized).

getAction

@PDF(value=PDF11)
public Action getAction()
Gets the action to be performed when the annotation is activated.


getActions

@PDF(value=PDF12)
public AnnotationActions getActions()
Gets the annotation's behavior in response to various trigger events.


getAppearance

@PDF(value=PDF12)
public Appearance getAppearance()
Gets the appearance specifying how the annotation is presented visually on the page.


getBorder

@PDF(value=PDF11)
public Border getBorder()
Gets the border style.


getBox

public Rectangle2D getBox()
Gets the location of the annotation on the page in default user space units.


getColor

@PDF(value=PDF11)
public DeviceColor getColor()
Gets the annotation color.

Since:
0.1.1

getFlags

@PDF(value=PDF11)
public EnumSet<Annotation.FlagsEnum> getFlags()
Gets the annotation flags.


getModificationDate

@PDF(value=PDF11)
public Date getModificationDate()
Gets the date and time when the annotation was most recently modified.


getName

@PDF(value=PDF14)
public String getName()
Gets the annotation name.

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


getPage

@PDF(value=PDF13)
public Page getPage()
Gets the associated page.


getText

public String getText()
Gets the annotation text.

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


isPrintable

@PDF(value=PDF11)
public boolean isPrintable()
Gets whether to print the annotation when the page is printed.


isVisible

@PDF(value=PDF11)
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()

setColor

public void setColor(DeviceColor value)
See Also:
getColor()

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()

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()

getLayer

@PDF(value=PDF15)
public LayerEntity getLayer()
Description copied from interface: ILayerable
Gets the layer entity associated to this object.

Specified by:
getLayer in interface ILayerable

setLayer

public void setLayer(LayerEntity value)
Specified by:
setLayer in interface ILayerable
See Also:
ILayerable.getLayer()

PDF Clown
0.1.2

Project home page

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