| java.lang.Object gnu.jpdf.PDFObject gnu.jpdf.PDFAnnot
PDFAnnot | public class PDFAnnot extends PDFObject implements Serializable(Code) | | This class defines an annotation (commonly known as a Bookmark).
author: Eric Z. Beard, ericzbeard@hotmail.com author: Peter T Mount, http://www.retep.org.uk/pdf/ author: $Author: ezb $ version: $Revision: 1.3 $, $Date: 2001/11/16 15:26:04 $ |
Field Summary | |
final public static short | BEVELED | final public static short | DASHED The border is drawn with a dashed line. | final public static short | INSET | final public static short | SOLID Solid border. | final public static short | UNDERLINED |
Constructor Summary | |
protected | PDFAnnot(String s, int l, int b, int r, int t) This is used to create an annotation. | public | PDFAnnot(int l, int b, int r, int t, String s) | public | PDFAnnot(int l, int b, int r, int t, PDFObject dest) Creates a link annotation
Parameters: l - Left coordinate Parameters: b - Bottom coordinate Parameters: r - Right coordinate Parameters: t - Top coordinate Parameters: dest - Destination for this link. | public | PDFAnnot(int l, int b, int r, int t, PDFObject dest, int fl, int fb, int fr, int ft) |
Method Summary | |
public void | setBorder(short style, double width) Sets the border for the annotation. | public void | setBorder(double width, double dash) Sets the border for the annotation. | public void | write(OutputStream os) |
BEVELED | final public static short BEVELED(Code) | | The border is drawn in a beveled style (faux three-dimensional) such
that it looks as if it is pushed out of the page (opposite of INSET)
|
DASHED | final public static short DASHED(Code) | | The border is drawn with a dashed line.
|
INSET | final public static short INSET(Code) | | The border is drawn in an inset style (faux three-dimensional) such
that it looks as if it is inset into the page (opposite of BEVELED)
|
SOLID | final public static short SOLID(Code) | | Solid border. The border is drawn as a solid line.
|
UNDERLINED | final public static short UNDERLINED(Code) | | The border is drawn as a line on the bottom of the annotation rectangle
|
PDFAnnot | protected PDFAnnot(String s, int l, int b, int r, int t)(Code) | | This is used to create an annotation.
Parameters: s - Subtype for this annotation Parameters: l - Left coordinate Parameters: b - Bottom coordinate Parameters: r - Right coordinate Parameters: t - Top coordinate |
PDFAnnot | public PDFAnnot(int l, int b, int r, int t, String s)(Code) | | Creates a text annotation
Parameters: l - Left coordinate Parameters: b - Bottom coordinate Parameters: r - Right coordinate Parameters: t - Top coordinate Parameters: s - Text for this annotation |
PDFAnnot | public PDFAnnot(int l, int b, int r, int t, PDFObject dest)(Code) | | Creates a link annotation
Parameters: l - Left coordinate Parameters: b - Bottom coordinate Parameters: r - Right coordinate Parameters: t - Top coordinate Parameters: dest - Destination for this link. The page will fit the display. |
PDFAnnot | public PDFAnnot(int l, int b, int r, int t, PDFObject dest, int fl, int fb, int fr, int ft)(Code) | | Creates a link annotation
Parameters: l - Left coordinate Parameters: b - Bottom coordinate Parameters: r - Right coordinate Parameters: t - Top coordinate Parameters: dest - Destination for this link Parameters: rect - Rectangle describing what part of the page to be displayed(must be in User Coordinates) |
setBorder | public void setBorder(short style, double width)(Code) | | Sets the border for the annotation. By default, no border is defined.
If the style is DASHED, then this method uses PDF's default dash
scheme {3}
Important: the annotation must have been added to the document before
this is used. If the annotation was created using the methods in
PDFPage, then the annotation is already in the document.
Parameters: style - Border style SOLID, DASHED, BEVELED, INSET or UNDERLINED. Parameters: width - Width of the border |
setBorder | public void setBorder(double width, double dash)(Code) | | Sets the border for the annotation. Unlike the other method, this
produces a dashed border.
Important: the annotation must have been added to the document before
this is used. If the annotation was created using the methods in
PDFPage, then the annotation is already in the document.
Parameters: width - Width of the border Parameters: dash - Array of lengths, used for drawing the dashes. If thisis null, then the default of {3} is used. |
|
|