org.foray.pdf.object
Class PDFLink

java.lang.Object
  extended by org.foray.pdf.object.PDFObject
      extended by org.foray.pdf.object.PDFAnnotation
          extended by org.foray.pdf.object.PDFLink
All Implemented Interfaces:
org.axsl.pdf.PdfLink

public class PDFLink
extends PDFAnnotation
implements org.axsl.pdf.PdfLink

A PDF /Annot object of /Subtype /Link.


Field Summary
 
Fields inherited from class org.foray.pdf.object.PDFObject
EOL, MSG_EOL, XREF_EOL
 
Constructor Summary
PDFLink(PDFPage page, Rectangle2D rect, PDFAction action)
          Constructor for a link to an action.
PDFLink(PDFPage page, Rectangle2D rect, PDFDestination destination)
          Constructor for a link to a named destination.
PDFLink(PDFPage page, Rectangle2D rect, String destinationName)
          Constructor for a link to a named destination.
 
Method Summary
 PDFColor getColor()
          Returns the color for this link.
 void setColor(PDFColor color)
          Sets the color for this link.
 String toPDF()
          Generates the PDF text necessary to represent the object, returning it as a String.
 
Methods inherited from class org.foray.pdf.object.PDFAnnotation
getRectangle
 
Methods inherited from class org.foray.pdf.object.PDFObject
bufferToByteArray, byteArrayToStream, getCharsPerLine, getGeneration, getLogger, getNumber, getPDFDocument, output, pdfID, pdfReference, setNumber, stringToByteArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PDFLink

public PDFLink(PDFPage page,
               Rectangle2D rect,
               String destinationName)
Constructor for a link to a named destination.

Parameters:
page - The page on which this link exists.
rect - The rectangle which outlines the link. All dimension in the rectangle should be expressed in 1/1000ths of a user space unit.
destinationName - The name of the destination to which this link points.

PDFLink

public PDFLink(PDFPage page,
               Rectangle2D rect,
               PDFDestination destination)
Constructor for a link to a named destination.

Parameters:
page - The page on which this link exists.
rect - The rectangle which outlines the link. All dimension in the rectangle should be expressed in 1/1000ths of a user space unit.
destination - The destination to which this link points.

PDFLink

public PDFLink(PDFPage page,
               Rectangle2D rect,
               PDFAction action)
Constructor for a link to an action.

Parameters:
page - The page on which this link exists.
rect - The rectangle which outlines the link. All dimension in the rectangle should be expressed in 1/1000ths of a user space unit.
action - The action to be activated by this link.
Method Detail

getColor

public PDFColor getColor()
Returns the color for this link.

Returns:
Returns the color.

setColor

public void setColor(PDFColor color)
Sets the color for this link.

Parameters:
color - The color to set.

toPDF

public String toPDF()
Description copied from class: PDFObject
Generates the PDF text necessary to represent the object, returning it as a String.

Returns:
The PDF text necessary to represent the object.


Copyright © 2017. All rights reserved.