org.faceless.pdf2
Class AnnotationLink

java.lang.Object
  extended byorg.faceless.pdf2.PDFObject
      extended byorg.faceless.pdf2.PDFMap
          extended byorg.faceless.pdf2.PDFAnnotation
              extended byorg.faceless.pdf2.AnnotationLink
All Implemented Interfaces:
Cloneable

public final class AnnotationLink
extends PDFAnnotation

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.

Since:
2.0

Constructor Summary
AnnotationLink()
          Create a new Link annotation with a default setStyle(org.faceless.pdf2.PDFStyle) of null
 
Method Summary
 PDFAction getAction()
          Return the action performed by this hyperlink
 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 setStyle(PDFStyle style)
           Set the style for this hyperlink annotation.
 
Methods inherited from class org.faceless.pdf2.PDFAnnotation
equals, getCreationDate, getInReplyTo, getModifyDate, getPage, getSubject, getType, getUniqueID, isPrintable, isReadOnly, isVisible, setInReplyTo, setPage, setPrintable, setReadOnly, setRectangle, setSubject, setUniqueID, setVisible, toString
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AnnotationLink

public AnnotationLink()
Create a new Link annotation with a default setStyle(org.faceless.pdf2.PDFStyle) of null

Method Detail

setAction

public void setAction(PDFAction action)
Set the action for this hyperlink


getAction

public PDFAction getAction()
Return the action performed by this hyperlink


getRectangle

public float[] getRectangle()
Description copied from class: PDFAnnotation
Return the rectangle this annotation applies to on the page, or null if no rectangle applies for this type of annotation. See the setRectangle() method for a discussion on units.

Overrides:
getRectangle in class PDFAnnotation
Returns:
the rectangle for this annotation, in the form of an array (x1, y1, x2, y2)
See Also:
PDFAnnotation.setRectangle(float, float, float, float)

setStyle

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

Parameters:
style - the style to draw the link in - may be null


Copyright © 2001-2004 Big Faceless Organization