Package org.apache.fop.render.pdf
Class PDFDocumentNavigationHandler
- java.lang.Object
-
- org.apache.fop.render.pdf.PDFDocumentNavigationHandler
-
- All Implemented Interfaces:
IFDocumentNavigationHandler
public class PDFDocumentNavigationHandler extends java.lang.Object implements IFDocumentNavigationHandler
Implementation of theIFDocumentNavigationHandlerinterface for PDF output.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.MapcompleteActionsprivate PDFDocumentHandlerdocumentHandlerprivate java.util.MapincompleteActions
-
Constructor Summary
Constructors Constructor Description PDFDocumentNavigationHandler(PDFDocumentHandler documentHandler)Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddResolvedAction(AbstractAction action)voidcommit()Commits all pending elements to the PDF document.private PDFActiongetAction(AbstractAction action)private java.lang.StringgetCompleteID(AbstractAction action)intgetPageIndex()(package private) PDFDocumentgetPDFDoc()private voidrenderBookmark(Bookmark bookmark, PDFOutline parent)voidrenderBookmarkTree(BookmarkTree tree)Render the bookmark tree.voidrenderLink(Link link)voidrenderNamedDestination(NamedDestination destination)Renders a named destination.private voidupdateTargetLocation(PDFGoTo pdfGoTo, GoToXYAction action)
-
-
-
Field Detail
-
documentHandler
private final PDFDocumentHandler documentHandler
-
incompleteActions
private final java.util.Map incompleteActions
-
completeActions
private final java.util.Map completeActions
-
-
Constructor Detail
-
PDFDocumentNavigationHandler
public PDFDocumentNavigationHandler(PDFDocumentHandler documentHandler)
Default constructor.- Parameters:
documentHandler- the parent document handler
-
-
Method Detail
-
getPDFDoc
PDFDocument getPDFDoc()
-
renderNamedDestination
public void renderNamedDestination(NamedDestination destination) throws IFException
Renders a named destination.- Specified by:
renderNamedDestinationin interfaceIFDocumentNavigationHandler- Parameters:
destination- the named destination- Throws:
IFException- if an error occurs while handling this event
-
renderBookmarkTree
public void renderBookmarkTree(BookmarkTree tree) throws IFException
Render the bookmark tree.- Specified by:
renderBookmarkTreein interfaceIFDocumentNavigationHandler- Parameters:
tree- the bookmark tree- Throws:
IFException- if an error occurs while handling this event
-
renderBookmark
private void renderBookmark(Bookmark bookmark, PDFOutline parent) throws IFException
- Throws:
IFException
-
renderLink
public void renderLink(Link link) throws IFException
- Specified by:
renderLinkin interfaceIFDocumentNavigationHandler- Parameters:
link- a link- Throws:
IFException- of not caught
-
commit
public void commit()
Commits all pending elements to the PDF document.
-
addResolvedAction
public void addResolvedAction(AbstractAction action) throws IFException
- Specified by:
addResolvedActionin interfaceIFDocumentNavigationHandler- Parameters:
action- an action- Throws:
IFException- of not caught
-
getPageIndex
public int getPageIndex()
- Specified by:
getPageIndexin interfaceIFDocumentNavigationHandler
-
getAction
private PDFAction getAction(AbstractAction action) throws IFException
- Throws:
IFException
-
updateTargetLocation
private void updateTargetLocation(PDFGoTo pdfGoTo, GoToXYAction action) throws IFException
- Throws:
IFException
-
getCompleteID
private java.lang.String getCompleteID(AbstractAction action)
-
-