|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.faceless.pdf2.PDFAnnotation
org.faceless.pdf2.AnnotationLink
public final class AnnotationLink
A subtype new PDFAnnotation that performs the specified action
when clicked. This can be used to create an HTML-style hyperlink,
play a sound, or perform some other PDFAction.
| Constructor Summary | |
|---|---|
AnnotationLink()
Create a new Link annotation with a default setStyle(org.faceless.pdf2.PDFStyle) of null |
|
| Method Summary | |
|---|---|
protected Object |
clone()
|
boolean |
equals(Object o)
|
PDFAction |
getAction()
Return the action performed by this hyperlink |
float[] |
getCorners()
Return the four corners of the annotation, as specified by setCorners(). |
float[] |
getRectangle()
Return the rectangle this annotation applies to on the page, or null if no rectangle applies for this type of annotation. |
void |
setAction(PDFAction action)
Set the action for this hyperlink |
void |
setCorners(float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4)
Set the four corners (x1,y1) (x2,y2) (x3,y3) (x4,y4) of the quadrilateral that encompasses the text underlying this annotation, specified counter-clockwise. |
void |
setStyle(PDFStyle style)
Set the style for this hyperlink annotation. |
String |
toString()
|
| Methods inherited from class org.faceless.pdf2.PDFAnnotation |
|---|
addReview, getAuthor, getColor, getContents, getCreationDate, getFlag, getInReplyTo, getModifyDate, getOpacity, getPage, getPopup, getReplies, getReviews, getSubject, getType, getUniqueID, isPrintable, isReadOnly, isVisible, setAuthor, setColor, setContents, setCreationDate, setFlag, setInReplyTo, setModifyDate, setOpacity, setPage, setPrintable, setReadOnly, setRebuildRequired, setRectangle, setSubject, setUniqueID, setVisible, touch |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AnnotationLink()
setStyle(org.faceless.pdf2.PDFStyle) of null
| Method Detail |
|---|
public void setAction(PDFAction action)
public PDFAction getAction()
public float[] getRectangle()
PDFAnnotationsetRectangle() method for a discussion on units.
getRectangle in class PDFAnnotationPDFAnnotation.setRectangle(float, float, float, float)public void setStyle(PDFStyle style)
Set the style for this hyperlink annotation. Parameters from the style
that are used include LineColor,
DashPattern,
LineWeighting and
FormStyle (although Acrobat 4 and earlier
will ignore the FormStyle)
Alternatively the style may be null to prevent
this link having any visible appearance on the page
style - the style to draw the link in - may be null
public void setCorners(float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4)
AnnotationMarkup.setCorners method. Note that
versions of Acrobat prior to 7.0 will not recognise this, and rely on the rectangle
set with the setRectangle() method instead. Consequently those wanting
non-rectanglur link annotations should set the co-ordinates using both this
method and setRectangle()
x1 - the X co-ordinate of the bottom-left corner of the texty1 - the Y co-ordinate of the bottom-left corner of the textx2 - the X co-ordinate of the bottom-right corner of the texty2 - the Y co-ordinate of the bottom-right corner of the textx3 - the X co-ordinate of the top-left corner of the texty3 - the Y co-ordinate of the top-left corner of the textx4 - the X co-ordinate of the top-right corner of the texty4 - the Y co-ordinate of the top-right corner of the textpublic float[] getCorners()
setCorners(). Note this feature was added in Acrobat 7.0
only, so many link annotations will return null here - see the
getRectangle() method for the most widely used method of defining the
area of a Link.
setCorners(), or
null if the area is specified by getRectangle()public String toString()
public boolean equals(Object o)
equals in class Objectprotected Object clone()
clone in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||