Bläddra i källkod

changes to support named destination

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@524604 13f79535-47bb-0310-9956-ffa450edef68
tags/fop-0_94
Jay Bryant 17 år sedan
förälder
incheckning
a741e35cd9
1 ändrade filer med 23 tillägg och 1 borttagningar
  1. 23
    1
      src/java/org/apache/fop/fo/pagination/Root.java

+ 23
- 1
src/java/org/apache/fop/fo/pagination/Root.java Visa fil

@@ -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

Laddar…
Avbryt
Spara