// FOP
import org.apache.fop.area.AreaTree;
-import org.apache.fop.area.AreaTreeModel;
import org.apache.fop.control.Document;
import org.apache.fop.fo.ElementMapping;
import org.apache.fop.fo.FOTreeBuilder;
import org.apache.fop.fo.FOUserAgent;
import org.apache.fop.fo.FOInputHandler;
import org.apache.fop.fo.FOTreeHandler;
-import org.apache.fop.area.Title;
-import org.apache.fop.fo.pagination.PageSequence;
import org.apache.fop.mif.MIFHandler;
import org.apache.fop.render.Renderer;
import org.apache.fop.render.awt.AWTRenderer;
import org.apache.fop.rtf.renderer.RTFHandler;
import org.apache.fop.tools.DocumentInputSource;
import org.apache.fop.tools.DocumentReader;
-import org.apache.fop.layout.LayoutStrategy;
import org.apache.fop.layoutmgr.LayoutManagerLS;
// Avalon
/**
* Main constructor
+ * @param driver the Driver object that is the "parent" of this Document
*/
public Document(Driver driver) {
this.driver = driver;
return layoutStrategy;
}
+ /**
+ * Public accessor for the parent Driver of this Document
+ * @return the parent Driver for this Document
+ */
public Driver getDriver() {
return driver;
}
import org.apache.fop.fo.FObj;
import org.apache.fop.fo.FOTreeVisitor;
import org.apache.fop.layout.PageMaster;
-import org.apache.fop.area.AreaTree;
import org.apache.fop.area.PageViewport;
import org.apache.fop.apps.FOPException;
-import org.apache.fop.layoutmgr.PageLayoutManager;
-
// Java
import java.util.HashMap;
return titleFO;
}
+ /**
+ * Hook for Visitor objects accessing the FO Tree.
+ * @param fotv the FOTreeVisitor object accessing this node of the FO Tree
+ */
public void acceptVisitor(FOTreeVisitor fotv) {
fotv.serveVisitor(this);
}
+ /**
+ * Public accessor for getting the MainFlow to which this PageSequence is
+ * attached.
+ * @return the MainFlow object to which this PageSequence is attached.
+ */
public Flow getMainFlow() {
return mainFlow;
}
+ /**
+ * Public accessor for getting the PageSequenceMaster to which this
+ * PageSequence is attached.
+ * @return the PageSequenceMaster to which this PageSequence is attached.
+ */
public PageSequenceMaster getPageSequenceMaster() {
return pageSequenceMaster;
}
+ /**
+ * Public accessor for getting the PageNumberGenerator.
+ * @return the PageNumberGenerator
+ */
public PageNumberGenerator getPageNumberGenerator() {
return pageNumberGenerator;
}
+ /**
+ * Public accessor for setting the currentPageNumber.
+ * @param currentPageNumber the value to which currentPageNumber should be
+ * set.
+ */
public void setCurrentPageNumber(int currentPageNumber) {
this.currentPageNumber = currentPageNumber;
}
+ /**
+ * Public accessor for the ancestor Root.
+ * @return the ancestor Root
+ */
public Root getRoot() {
return root;
}
return foTreeControl;
}
+ /**
+ * Hook for Visitor objects accessing the FO Tree.
+ * @param fotv the FOTreeVisitor object accessing this node of the FO Tree
+ */
public void acceptVisitor(FOTreeVisitor fotv) {
fotv.serveVisitor(this);
}
return name;
}
+ /**
+ * Format a PageSequence into an AreaTree
+ * @param pageSeq the PageSequence to be formatted
+ * @param areaTree the AreaTree in which to place the formatted PageSequence
+ * @throws FOPException for errors during layout
+ */
public abstract void format (PageSequence pageSeq, AreaTree areaTree)
throws FOPException;
}
/**
* Runs the formatting of this page sequence into the given area tree
*
+ * @param pageSeq the PageSequence to be formatted
* @param areaTree the area tree to format this page sequence into
* @throws FOPException if there is an error formatting the contents
*/