| Constructor: |
public Annotation(Annotation an) {
annotationtype = an.annotationtype;
annotationAttributes = an.annotationAttributes;
llx = an.llx;
lly = an.lly;
urx = an.urx;
ury = an.ury;
}
|
public Annotation(String title,
String text) {
annotationtype = TEXT;
annotationAttributes.put(TITLE, title);
annotationAttributes.put(CONTENT, text);
}
Constructs an Annotation with a certain title and some
text. Parameters:
title -
the title of the annotation
text -
the content of the annotation
|
public Annotation(float llx,
float lly,
float urx,
float ury,
URL url) {
this(llx, lly, urx, ury);
annotationtype = URL_NET;
annotationAttributes.put(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
|
public Annotation(float llx,
float lly,
float urx,
float ury,
String url) {
this(llx, lly, urx, ury);
annotationtype = URL_AS_STRING;
annotationAttributes.put(FILE, 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
|
public Annotation(float llx,
float lly,
float urx,
float ury,
int named) {
this(llx, lly, urx, ury);
annotationtype = NAMED_DEST;
annotationAttributes.put(NAMED, new Integer(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
|
public Annotation(String title,
String text,
float llx,
float lly,
float urx,
float ury) {
this(llx, lly, urx, ury);
annotationtype = TEXT;
annotationAttributes.put(TITLE, title);
annotationAttributes.put(CONTENT, text);
}
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
|
public Annotation(float llx,
float lly,
float urx,
float ury,
String file,
String dest) {
this(llx, lly, urx, ury);
annotationtype = FILE_DEST;
annotationAttributes.put(FILE, file);
annotationAttributes.put(DESTINATION, 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
|
public Annotation(float llx,
float lly,
float urx,
float ury,
String file,
int page) {
this(llx, lly, urx, ury);
annotationtype = FILE_PAGE;
annotationAttributes.put(FILE, file);
annotationAttributes.put(PAGE, new Integer(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
|
public Annotation(float llx,
float lly,
float urx,
float ury,
String moviePath,
String mimeType,
boolean showOnDisplay) {
this(llx, lly, urx, ury);
annotationtype = SCREEN;
annotationAttributes.put(FILE, moviePath);
annotationAttributes.put(MIMETYPE, mimeType);
annotationAttributes.put(PARAMETERS, new boolean[] {
false /* embedded */, 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
|
public Annotation(float llx,
float lly,
float urx,
float ury,
String application,
String parameters,
String operation,
String defaultdir) {
this(llx, lly, urx, ury);
annotationtype = LAUNCH;
annotationAttributes.put(APPLICATION, application);
annotationAttributes.put(PARAMETERS, parameters);
annotationAttributes.put(OPERATION, operation);
annotationAttributes.put(DEFAULTDIR, 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 from com.lowagie.text.Annotation Detail: |
public int annotationType() {
return annotationtype;
}
Returns the type of this Annotation. |
public HashMap attributes() {
return annotationAttributes;
}
Gets the content of this Annotation. |
public String content() {
String s = (String) annotationAttributes.get(CONTENT);
if (s == null)
s = "";
return s;
}
Gets the content of this Annotation. |
public ArrayList getChunks() {
return new ArrayList();
}
Gets all the chunks in this element. |
public boolean isContent() {
return true;
}
|
public boolean isNestable() {
return true;
}
|
public float llx() {
return llx;
}
Returns the lower left x-value. |
public float llx(float def) {
if (Float.isNaN(llx))
return def;
return llx;
}
Returns the lower left x-value. |
public float lly() {
return lly;
}
Returns the lower left y-value. |
public float lly(float def) {
if (Float.isNaN(lly))
return def;
return lly;
}
Returns the lower left y-value. |
public boolean process(ElementListener listener) {
try {
return listener.add(this);
} catch (DocumentException de) {
return false;
}
}
Processes the element by adding it (or the different parts) to an
ElementListener. |
public void setDimensions(float llx,
float lly,
float urx,
float ury) {
this.llx = llx;
this.lly = lly;
this.urx = urx;
this.ury = ury;
}
Sets the dimensions of this annotation. |
public String title() {
String s = (String) annotationAttributes.get(TITLE);
if (s == null)
s = "";
return s;
}
Returns the title of this Annotation. |
public int type() {
return Element.ANNOTATION;
}
Gets the type of the text element. |
public float urx() {
return urx;
}
Returns the upper right x-value. |
public float urx(float def) {
if (Float.isNaN(urx))
return def;
return urx;
}
Returns the upper right x-value. |
public float ury() {
return ury;
}
Returns the upper right y-value. |
public float ury(float def) {
if (Float.isNaN(ury))
return def;
return ury;
}
Returns the upper right y-value. |