|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gnu.jpdf.PDFObject gnu.jpdf.PDFAnnot
public class PDFAnnot
This class defines an annotation (commonly known as a Bookmark).
Field Summary | |
---|---|
static short |
BEVELED
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) |
static short |
DASHED
The border is drawn with a dashed line. |
static short |
INSET
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) |
static short |
SOLID
Solid border. |
static short |
UNDERLINED
The border is drawn as a line on the bottom of the annotation rectangle |
Fields inherited from class gnu.jpdf.PDFObject |
---|
objser, pdfDocument |
Constructor Summary | |
---|---|
|
PDFAnnot(int l,
int b,
int r,
int t,
PDFObject dest)
Creates a link annotation |
|
PDFAnnot(int l,
int b,
int r,
int t,
PDFObject dest,
int fl,
int fb,
int fr,
int ft)
Creates a link annotation |
|
PDFAnnot(int l,
int b,
int r,
int t,
java.lang.String s)
Creates a text annotation |
protected |
PDFAnnot(java.lang.String s,
int l,
int b,
int r,
int t)
This is used to create an annotation. |
Method Summary | |
---|---|
void |
setBorder(double width,
double[] dash)
Sets the border for the annotation. |
void |
setBorder(short style,
double width)
Sets the border for the annotation. |
void |
write(java.io.OutputStream os)
Should this be public?? |
Methods inherited from class gnu.jpdf.PDFObject |
---|
getPDFDocument, getSerialID, getType, toArray, toString, writeEnd, writeStart |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final short SOLID
public static final short DASHED
public static final short BEVELED
public static final short INSET
public static final short UNDERLINED
Constructor Detail |
---|
protected PDFAnnot(java.lang.String s, int l, int b, int r, int t)
s
- Subtype for this annotationl
- Left coordinateb
- Bottom coordinater
- Right coordinatet
- Top coordinatepublic PDFAnnot(int l, int b, int r, int t, java.lang.String s)
l
- Left coordinateb
- Bottom coordinater
- Right coordinatet
- Top coordinates
- Text for this annotationpublic PDFAnnot(int l, int b, int r, int t, PDFObject dest)
l
- Left coordinateb
- Bottom coordinater
- Right coordinatet
- Top coordinatedest
- Destination for this link. The page will fit the display.public PDFAnnot(int l, int b, int r, int t, PDFObject dest, int fl, int fb, int fr, int ft)
l
- Left coordinateb
- Bottom coordinater
- Right coordinatet
- Top coordinatedest
- Destination for this linkfl
- Left coordinatefb
- Bottom coordinatefr
- Right coordinateft
- Top coordinate
(must be in User Coordinates)Method Detail |
---|
public void setBorder(short style, double width)
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.
style
- Border style SOLID, DASHED, BEVELED, INSET or UNDERLINED.width
- Width of the borderpublic void setBorder(double width, double[] dash)
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.
width
- Width of the borderdash
- Array of lengths, used for drawing the dashes. If this
is null, then the default of {3} is used.public void write(java.io.OutputStream os) throws java.io.IOException
write
in class PDFObject
os
- OutputStream to send the object to
java.io.IOException
- on error
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |