com.lowagie.text

Class Annotation

public class Annotation extends Object implements Element

An Annotation is a little note that can be added to a page on a document.

See Also: Element Anchor

Field Summary
static StringAPPLICATION
This is a possible attribute.
protected HashMapannotationAttributes
This is the title of the Annotation.
protected intannotationtype
This is the type of annotation.
static StringCONTENT
This is a possible attribute.
static StringDEFAULTDIR
This is a possible attribute.
static StringDESTINATION
This is a possible attribute.
static StringFILE
This is a possible attribute.
static intFILE_DEST
This is a possible annotation type.
static intFILE_PAGE
This is a possible annotation type.
protected floatllx
This is the lower left x-value
protected floatlly
This is the lower left y-value
static intLAUNCH
This is a possible annotation type.
static StringLLX
This is a possible attribute.
static StringLLY
This is a possible attribute.
static StringMIMETYPE
This is a possible attribute.
static StringNAMED
This is a possible attribute.
static intNAMED_DEST
This is a possible annotation type.
static StringOPERATION
This is a possible attribute.
static StringPAGE
This is a possible attribute.
static StringPARAMETERS
This is a possible attribute.
static intSCREEN
This is a possible annotation type.
static intTEXT
This is a possible annotation type.
static StringTITLE
This is a possible attribute.
protected floaturx
This is the upper right x-value
protected floatury
This is the upper right y-value
static StringURL
This is a possible attribute.
static intURL_AS_STRING
This is a possible annotation type.
static intURL_NET
This is a possible annotation type.
static StringURX
This is a possible attribute.
static StringURY
This is a possible attribute.
Constructor Summary
Annotation(float llx, float lly, float urx, float ury)
Constructs an Annotation with a certain title and some text.
Annotation(Annotation an)
Copy constructor.
Annotation(String title, String text)
Constructs an Annotation with a certain title and some text.
Annotation(String title, String text, float llx, float lly, float urx, float ury)
Constructs an Annotation with a certain title and some text.
Annotation(float llx, float lly, float urx, float ury, URL url)
Constructs an Annotation.
Annotation(float llx, float lly, float urx, float ury, String url)
Constructs an Annotation.
Annotation(float llx, float lly, float urx, float ury, String file, String dest)
Constructs an Annotation.
Annotation(float llx, float lly, float urx, float ury, String moviePath, String mimeType, boolean showOnDisplay)
Creates a Screen annotation to embed media clips
Annotation(float llx, float lly, float urx, float ury, String file, int page)
Constructs an Annotation.
Annotation(float llx, float lly, float urx, float ury, int named)
Constructs an Annotation.
Annotation(float llx, float lly, float urx, float ury, String application, String parameters, String operation, String defaultdir)
Constructs an Annotation.
Method Summary
intannotationType()
Returns the type of this Annotation.
HashMapattributes()
Gets the content of this Annotation.
Stringcontent()
Gets the content of this Annotation.
ArrayListgetChunks()
Gets all the chunks in this element.
booleanisContent()
booleanisNestable()
floatllx()
Returns the lower left x-value.
floatllx(float def)
Returns the lower left x-value.
floatlly()
Returns the lower left y-value.
floatlly(float def)
Returns the lower left y-value.
booleanprocess(ElementListener listener)
Processes the element by adding it (or the different parts) to an ElementListener.
voidsetDimensions(float llx, float lly, float urx, float ury)
Sets the dimensions of this annotation.
Stringtitle()
Returns the title of this Annotation.
inttype()
Gets the type of the text element.
floaturx()
Returns the upper right x-value.
floaturx(float def)
Returns the upper right x-value.
floatury()
Returns the upper right y-value.
floatury(float def)
Returns the upper right y-value.

Field Detail

APPLICATION

public static final String APPLICATION
This is a possible attribute.

annotationAttributes

protected HashMap annotationAttributes
This is the title of the Annotation.

annotationtype

protected int annotationtype
This is the type of annotation.

CONTENT

public static final String CONTENT
This is a possible attribute.

DEFAULTDIR

public static final String DEFAULTDIR
This is a possible attribute.

DESTINATION

public static final String DESTINATION
This is a possible attribute.

FILE

public static final String FILE
This is a possible attribute.

FILE_DEST

public static final int FILE_DEST
This is a possible annotation type.

FILE_PAGE

public static final int FILE_PAGE
This is a possible annotation type.

llx

protected float llx
This is the lower left x-value

lly

protected float lly
This is the lower left y-value

LAUNCH

public static final int LAUNCH
This is a possible annotation type.

LLX

public static final String LLX
This is a possible attribute.

LLY

public static final String LLY
This is a possible attribute.

MIMETYPE

public static final String MIMETYPE
This is a possible attribute.

NAMED

public static final String NAMED
This is a possible attribute.

NAMED_DEST

public static final int NAMED_DEST
This is a possible annotation type.

OPERATION

public static final String OPERATION
This is a possible attribute.

PAGE

public static final String PAGE
This is a possible attribute.

PARAMETERS

public static final String PARAMETERS
This is a possible attribute.

SCREEN

public static final int SCREEN
This is a possible annotation type.

TEXT

public static final int TEXT
This is a possible annotation type.

TITLE

public static final String TITLE
This is a possible attribute.

urx

protected float urx
This is the upper right x-value

ury

protected float ury
This is the upper right y-value

URL

public static final String URL
This is a possible attribute.

URL_AS_STRING

public static final int URL_AS_STRING
This is a possible annotation type.

URL_NET

public static final int URL_NET
This is a possible annotation type.

URX

public static final String URX
This is a possible attribute.

URY

public static final String URY
This is a possible attribute.

Constructor Detail

Annotation

private Annotation(float llx, float lly, float urx, float ury)
Constructs an Annotation with a certain title and some text.

Parameters: llx lower left x coordinate lly lower left y coordinate urx upper right x coordinate ury upper right y coordinate

Annotation

public Annotation(Annotation an)
Copy constructor.

Annotation

public Annotation(String title, String text)
Constructs an Annotation with a certain title and some text.

Parameters: title the title of the annotation text the content of the annotation

Annotation

public Annotation(String title, String text, float llx, float lly, float urx, float ury)
Constructs an Annotation with a certain title and some text.

Parameters: title the title of the annotation text the content of the annotation llx the lower left x-value lly the lower left y-value urx the upper right x-value ury the upper right y-value

Annotation

public Annotation(float llx, float lly, float urx, float ury, URL url)
Constructs an Annotation.

Parameters: llx the lower left x-value lly the lower left y-value urx the upper right x-value ury the upper right y-value url the external reference

Annotation

public Annotation(float llx, float lly, float urx, float ury, String url)
Constructs an Annotation.

Parameters: llx the lower left x-value lly the lower left y-value urx the upper right x-value ury the upper right y-value url the external reference

Annotation

public Annotation(float llx, float lly, float urx, float ury, String file, String dest)
Constructs an Annotation.

Parameters: llx the lower left x-value lly the lower left y-value urx the upper right x-value ury the upper right y-value file an external PDF file dest the destination in this file

Annotation

public Annotation(float llx, float lly, float urx, float ury, String moviePath, String mimeType, boolean showOnDisplay)
Creates a Screen annotation to embed media clips

Parameters: llx lly urx ury moviePath path to the media clip file mimeType mime type of the media showOnDisplay if true play on display of the page

Annotation

public Annotation(float llx, float lly, float urx, float ury, String file, int page)
Constructs an Annotation.

Parameters: llx the lower left x-value lly the lower left y-value urx the upper right x-value ury the upper right y-value file an external PDF file page a page number in this file

Annotation

public Annotation(float llx, float lly, float urx, float ury, int named)
Constructs an Annotation.

Parameters: llx the lower left x-value lly the lower left y-value urx the upper right x-value ury the upper right y-value named a named destination in this file

Annotation

public Annotation(float llx, float lly, float urx, float ury, String application, String parameters, String operation, String defaultdir)
Constructs an Annotation.

Parameters: llx the lower left x-value lly the lower left y-value urx the upper right x-value ury the upper right y-value application an external application parameters parameters to pass to this application operation the operation to pass to this application defaultdir the default directory to run this application in

Method Detail

annotationType

public int annotationType()
Returns the type of this Annotation.

Returns: a type

attributes

public HashMap attributes()
Gets the content of this Annotation.

Returns: a reference

content

public String content()
Gets the content of this Annotation.

Returns: a reference

getChunks

public ArrayList getChunks()
Gets all the chunks in this element.

Returns: an ArrayList

isContent

public boolean isContent()

Since: iText 2.0.8

See Also: isContent

isNestable

public boolean isNestable()

Since: iText 2.0.8

See Also: isNestable

llx

public float llx()
Returns the lower left x-value.

Returns: a value

llx

public float llx(float def)
Returns the lower left x-value.

Parameters: def the default value

Returns: a value

lly

public float lly()
Returns the lower left y-value.

Returns: a value

lly

public float lly(float def)
Returns the lower left y-value.

Parameters: def the default value

Returns: a value

process

public boolean process(ElementListener listener)
Processes the element by adding it (or the different parts) to an ElementListener.

Parameters: listener an ElementListener

Returns: true if the element was processed successfully

setDimensions

public void setDimensions(float llx, float lly, float urx, float ury)
Sets the dimensions of this annotation.

Parameters: llx the lower left x-value lly the lower left y-value urx the upper right x-value ury the upper right y-value

title

public String title()
Returns the title of this Annotation.

Returns: a name

type

public int type()
Gets the type of the text element.

Returns: a type

urx

public float urx()
Returns the upper right x-value.

Returns: a value

urx

public float urx(float def)
Returns the upper right x-value.

Parameters: def the default value

Returns: a value

ury

public float ury()
Returns the upper right y-value.

Returns: a value

ury

public float ury(float def)
Returns the upper right y-value.

Parameters: def the default value

Returns: a value