org.apache.fop.pdf

Class PDFGoTo

Implemented Interfaces:
PDFWritable

public class PDFGoTo
extends PDFAction

class representing a /GoTo object. This can either have a Goto to a page reference and location or to a specified PDF reference string.

Field Summary

Fields inherited from class org.apache.fop.pdf.PDFObject

DATE_FORMAT, log

Constructor Summary

PDFGoTo(String pageReference)
create a /GoTo object.
PDFGoTo(String pageReference, Point2D position)
create a /GoTo object.

Method Summary

boolean
equals(Object obj)
Check if this equals another object.
String
getAction()
Get the PDF reference for the GoTo action.
void
setDestination(String dest)
Set the destination string for this Goto.
void
setPageReference(String pageReference)
Sets page reference after object has been created
void
setPosition(Point2D position)
Sets the target (X,Y) position
void
setXPosition(float xPosition)
Sets the x Position to jump to
void
setYPosition(float yPosition)
Sets the Y position to jump to
String
toPDFString()

Methods inherited from class org.apache.fop.pdf.PDFAction

getAction

Methods inherited from class org.apache.fop.pdf.PDFObject

encode, encodeString, encodeText, formatDateTime, formatObject, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, hasObjectNumber, makeReference, output, referencePDF, setDocument, setObjectNumber, toInlinePDFString, toPDF, toPDFString

Constructor Details

PDFGoTo

public PDFGoTo(String pageReference)
create a /GoTo object.
Parameters:
pageReference - the pageReference represented by this object

PDFGoTo

public PDFGoTo(String pageReference,
               Point2D position)
create a /GoTo object.
Parameters:
pageReference - the PDF reference to the target page
position - the target area's on-page coordinates in points

Method Details

equals

public boolean equals(Object obj)
Check if this equals another object.
Parameters:
obj - the object to compare
Returns:
true if this equals other object

getAction

public String getAction()
Get the PDF reference for the GoTo action.
Overrides:
getAction in interface PDFAction
Returns:
the PDF reference for the action

setDestination

public void setDestination(String dest)
Set the destination string for this Goto.
Parameters:
dest - the PDF destination string

setPageReference

public void setPageReference(String pageReference)
Sets page reference after object has been created
Parameters:
pageReference - the new page reference to use

setPosition

public void setPosition(Point2D position)
Sets the target (X,Y) position
Parameters:
position - the target's on-page coordinates in points

setXPosition

public void setXPosition(float xPosition)
Sets the x Position to jump to
Parameters:
xPosition - x position

setYPosition

public void setYPosition(float yPosition)
Sets the Y position to jump to
Parameters:
yPosition - y position

toPDFString

public String toPDFString()
Overrides:
toPDFString in interface PDFObject

Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.