From a741e35cd93c8d134eb1784f8e39b5c09cdcaa93 Mon Sep 17 00:00:00 2001 From: Jay Bryant Date: Sun, 1 Apr 2007 14:49:29 +0000 Subject: [PATCH] changes to support named destination git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@524604 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/fop/fo/pagination/Root.java | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/fop/fo/pagination/Root.java b/src/java/org/apache/fop/fo/pagination/Root.java index 47ee3096a..23f9cd391 100644 --- a/src/java/org/apache/fop/fo/pagination/Root.java +++ b/src/java/org/apache/fop/fo/pagination/Root.java @@ -21,6 +21,7 @@ package org.apache.fop.fo.pagination; // java import java.util.List; +import java.util.ArrayList; import org.xml.sax.Locator; @@ -31,6 +32,7 @@ import org.apache.fop.fo.FObj; import org.apache.fop.fo.PropertyList; import org.apache.fop.fo.ValidationException; import org.apache.fop.fo.pagination.bookmarks.BookmarkTree; +import org.apache.fop.fo.extensions.destination.Destination; /** * The fo:root formatting object. Contains page masters, page-sequences. @@ -43,6 +45,7 @@ public class Root extends FObj { private LayoutMasterSet layoutMasterSet; private Declarations declarations; private BookmarkTree bookmarkTree = null; + private ArrayList destinationList; private List pageSequences; // temporary until above list populated @@ -64,7 +67,7 @@ public class Root extends FObj { */ public Root(FONode parent) { super(parent); - pageSequences = new java.util.ArrayList(); + pageSequences = new ArrayList(); if (parent != null) { //throw new FOPException("root must be root element"); } @@ -251,6 +254,25 @@ public class Root extends FObj { this.bookmarkTree = bookmarkTree; } + /** + * Add a Destination object to this FO + * @param destination the Destination object to add + */ + public void addDestination(Destination destination) { + if (destinationList == null) { + destinationList = new ArrayList(); + } + destinationList.add(destination); + } + + /** + * Public accessor for the list of Destination objects for this FO + * @return the Destination object + */ + public ArrayList getDestinationList() { + return destinationList; + } + /** * Public accessor for the BookmarkTree object for this FO * @return the BookmarkTree object -- 2.39.5