Class Annotation
java.lang.Object
com.gitlab.pdftk_java.com.lowagie.text.Annotation
- All Implemented Interfaces:
Element, MarkupAttributes
An
Annotation is a little note that can be added to a page on
a document.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected HashMapThis is the title of theAnnotation.protected intThis is the type of annotation.static StringThis is a possible attribute.static StringThis is a possible attribute.static StringThis is a possible attribute.static StringThis is a possible attribute.static StringThis is a possible attribute.static final intThis is a possible annotation type.static final intThis is a possible annotation type.static final intThis is a possible annotation type.protected floatThis is the lower left x-valuestatic StringThis is a possible attribute.protected floatThis is the lower left y-valuestatic StringThis is a possible attribute.protected PropertiesContains extra markupAttributesstatic StringThis is a possible attribute.static StringThis is a possible attribute.static final intThis is a possible annotation type.static StringThis is a possible attribute.static StringThis is a possible attribute.static StringThis is a possible attribute.static final intThis is a possible annotation type.static final intThis is a possible annotation type.static StringThis is a possible attribute.static StringThis is a possible attribute.static final intThis is a possible annotation type.static final intThis is a possible annotation type.protected floatThis is the upper right x-valuestatic StringThis is a possible attribute.protected floatThis is the upper right y-valuestatic StringThis is a possible attribute.Fields inherited from interface Element
ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_JUSTIFIED, ALIGN_JUSTIFIED_ALL, ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_RIGHT, ALIGN_TOP, ALIGN_UNDEFINED, ANCHOR, ANNOTATION, AUTHOR, CCITT_BLACKIS1, CCITT_ENCODEDBYTEALIGN, CCITT_ENDOFBLOCK, CCITT_ENDOFLINE, CCITTG3_1D, CCITTG3_2D, CCITTG4, CELL, CHAPTER, CHUNK, CREATIONDATE, CREATOR, GRAPHIC, HEADER, IMGRAW, IMGTEMPLATE, JPEG, KEYWORDS, LIST, LISTITEM, MULTI_COLUMN_TEXT, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, ROW, SECTION, SUBJECT, TABLE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateAnnotation(float llx, float lly, float urx, float ury) Constructs anAnnotationwith a certain title and some text.Annotation(float llx, float lly, float urx, float ury, int named) Constructs anAnnotation.Annotation(float llx, float lly, float urx, float ury, String url) Constructs anAnnotation.Annotation(float llx, float lly, float urx, float ury, String file, int page) Constructs anAnnotation.Annotation(float llx, float lly, float urx, float ury, String file, String dest) Constructs anAnnotation.Annotation(float llx, float lly, float urx, float ury, String moviePath, String mimeType, boolean showOnDisplay) Creates a Screen anotation to embed media clipsAnnotation(float llx, float lly, float urx, float ury, String application, String parameters, String operation, String defaultdir) Constructs anAnnotation.Annotation(float llx, float lly, float urx, float ury, URL url) Constructs anAnnotation.Annotation(Annotation an) Annotation(String title, String text) Constructs anAnnotationwith a certain title and some text.Annotation(String title, String text, float llx, float lly, float urx, float ury) Constructs anAnnotationwith a certain title and some text.Annotation(Properties attributes) Returns anAnnotationthat has been constructed taking in account the value of some attributes . -
Method Summary
Modifier and TypeMethodDescriptionintReturns the type of thisAnnotation.Gets the content of thisAnnotation.content()Gets the content of thisAnnotation.Gets all the chunks in this element.getMarkupAttribute(String name) Returns the value of the specified attribute.Returns aSetofStringattribute names for theMarkupAttributesimplementor.Return aProperties-object containing all the markupAttributes.static booleanChecks if a given tag corresponds with this object.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 anElementListener.voidsetDimensions(float llx, float lly, float urx, float ury) Sets the dimensions of this annotation.voidsetMarkupAttribute(String name, String value) Sets the specified attribute.voidsetMarkupAttributes(Properties markupAttributes) Sets the markupAttributes.title()Returns the title of thisAnnotation.inttype()Gets the type of the text element.floaturx()Returns the uppper right x-value.floaturx(float def) Returns the upper right x-value.floatury()Returns the uppper right y-value.floatury(float def) Returns the upper right y-value.
-
Field Details
-
TEXT
public static final int TEXTThis is a possible annotation type.- See Also:
-
URL_NET
public static final int URL_NETThis is a possible annotation type.- See Also:
-
URL_AS_STRING
public static final int URL_AS_STRINGThis is a possible annotation type.- See Also:
-
FILE_DEST
public static final int FILE_DESTThis is a possible annotation type.- See Also:
-
FILE_PAGE
public static final int FILE_PAGEThis is a possible annotation type.- See Also:
-
NAMED_DEST
public static final int NAMED_DESTThis is a possible annotation type.- See Also:
-
LAUNCH
public static final int LAUNCHThis is a possible annotation type.- See Also:
-
SCREEN
public static final int SCREENThis is a possible annotation type.- See Also:
-
TITLE
This is a possible attribute. -
CONTENT
This is a possible attribute. -
URL
This is a possible attribute. -
FILE
This is a possible attribute. -
DESTINATION
This is a possible attribute. -
PAGE
This is a possible attribute. -
NAMED
This is a possible attribute. -
APPLICATION
This is a possible attribute. -
PARAMETERS
This is a possible attribute. -
OPERATION
This is a possible attribute. -
DEFAULTDIR
This is a possible attribute. -
LLX
This is a possible attribute. -
LLY
This is a possible attribute. -
URX
This is a possible attribute. -
URY
This is a possible attribute. -
MIMETYPE
This is a possible attribute. -
annotationtype
protected int annotationtypeThis is the type of annotation. -
annotationAttributes
This is the title of theAnnotation. -
markupAttributes
Contains extra markupAttributes -
llx
protected float llxThis is the lower left x-value -
lly
protected float llyThis is the lower left y-value -
urx
protected float urxThis is the upper right x-value -
ury
protected float uryThis is the upper right y-value
-
-
Constructor Details
-
Annotation
private Annotation(float llx, float lly, float urx, float ury) Constructs anAnnotationwith a certain title and some text.- Parameters:
llx- lower left x coordinatelly- lower left y coordinateurx- upper right x coordinateury- upper right y coordinate
-
Annotation
-
Annotation
-
Annotation
Constructs anAnnotationwith a certain title and some text.- Parameters:
title- the title of the annotationtext- the content of the annotationllx- the lower left x-valuelly- the lower left y-valueurx- the upper right x-valueury- the upper right y-value
-
Annotation
Constructs anAnnotation.- Parameters:
llx- the lower left x-valuelly- the lower left y-valueurx- the upper right x-valueury- the upper right y-valueurl- the external reference
-
Annotation
Constructs anAnnotation.- Parameters:
llx- the lower left x-valuelly- the lower left y-valueurx- the upper right x-valueury- the upper right y-valueurl- the external reference
-
Annotation
Constructs anAnnotation.- Parameters:
llx- the lower left x-valuelly- the lower left y-valueurx- the upper right x-valueury- the upper right y-valuefile- an external PDF filedest- 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 anotation to embed media clips- Parameters:
llx-lly-urx-ury-moviePath- path to the media clip filemimeType- mime type of the mediashowOnDisplay- if true play on display of the page
-
Annotation
Constructs anAnnotation.- Parameters:
llx- the lower left x-valuelly- the lower left y-valueurx- the upper right x-valueury- the upper right y-valuefile- an external PDF filepage- a page number in this file
-
Annotation
public Annotation(float llx, float lly, float urx, float ury, int named) Constructs anAnnotation.- Parameters:
llx- the lower left x-valuelly- the lower left y-valueurx- the upper right x-valueury- the upper right y-valuenamed- 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 anAnnotation.- Parameters:
llx- the lower left x-valuelly- the lower left y-valueurx- the upper right x-valueury- the upper right y-valueapplication- an external applicationparameters- parameters to pass to this applicationoperation- the operation to pass to this applicationdefaultdir- the default directory to run this application in
-
Annotation
Returns anAnnotationthat has been constructed taking in account the value of some attributes .- Parameters:
attributes- Some attributes
-
-
Method Details
-
type
-
process
Processes the element by adding it (or the different parts) to anElementListener. -
getChunks
-
setDimensions
public void setDimensions(float llx, float lly, float urx, float ury) Sets the dimensions of this annotation.- Parameters:
llx- the lower left x-valuelly- the lower left y-valueurx- the upper right x-valueury- the upper right y-value
-
llx
public float llx()Returns the lower left x-value.- Returns:
- a value
-
lly
public float lly()Returns the lower left y-value.- Returns:
- a value
-
urx
public float urx()Returns the uppper right x-value.- Returns:
- a value
-
ury
public float ury()Returns the uppper right y-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(float def) Returns the lower left y-value.- Parameters:
def- the default 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(float def) Returns the upper right y-value.- Parameters:
def- the default value- Returns:
- a value
-
annotationType
public int annotationType()Returns the type of thisAnnotation.- Returns:
- a type
-
title
-
content
-
attributes
-
isTag
Checks if a given tag corresponds with this object.- Parameters:
tag- the given tag- Returns:
- true if the tag corresponds
-
setMarkupAttribute
Description copied from interface:MarkupAttributesSets the specified attribute.- Specified by:
setMarkupAttributein interfaceMarkupAttributes- Parameters:
name-Stringattribute name.value-Stringattribute value.- See Also:
-
setMarkupAttributes
Description copied from interface:MarkupAttributesSets the markupAttributes.- Specified by:
setMarkupAttributesin interfaceMarkupAttributes- Parameters:
markupAttributes- aProperties-object containing markupattributes- See Also:
-
getMarkupAttribute
Description copied from interface:MarkupAttributesReturns the value of the specified attribute.- Specified by:
getMarkupAttributein interfaceMarkupAttributes- Parameters:
name-Stringattribute name.- Returns:
String.- See Also:
-
getMarkupAttributeNames
Description copied from interface:MarkupAttributesReturns aSetofStringattribute names for theMarkupAttributesimplementor.- Specified by:
getMarkupAttributeNamesin interfaceMarkupAttributes- Returns:
Set.- See Also:
-
getMarkupAttributes
Description copied from interface:MarkupAttributesReturn aProperties-object containing all the markupAttributes.- Specified by:
getMarkupAttributesin interfaceMarkupAttributes- Returns:
Properties- See Also:
-