import org.apache.fop.fo.FOTreeControl;
import org.apache.fop.fo.extensions.Bookmarks;
import org.apache.fop.fonts.FontInfo;
-import org.apache.fop.layoutmgr.AddLMVisitor;
-
import org.apache.commons.logging.Log;
private Bookmarks bookmarks = null;
- /** Useful only for allowing subclasses of AddLMVisitor to be set by those
- extending FOP **/
- private AddLMVisitor addLMVisitor = null;
-
/**
* The current set of id's in the FO tree.
* This is used so we know if the FO tree contains duplicates.
return foInputHandler;
}
- /**
- * Public accessor to set the AddLMVisitor object that should be used.
- * This allows subclasses of AddLMVisitor to be used, which can be useful
- * for extensions to the FO Tree.
- * @param addLMVisitor the AddLMVisitor object that should be used.
- */
- public void setAddLMVisitor(AddLMVisitor addLMVisitor) {
- this.addLMVisitor = addLMVisitor;
- }
-
- /**
- * Public accessor to get the AddLMVisitor object that should be used.
- * @return the AddLMVisitor object that should be used.
- */
- public AddLMVisitor getAddLMVisitor() {
- if (this.addLMVisitor == null) {
- this.addLMVisitor = new AddLMVisitor();
- }
- return this.addLMVisitor;
- }
-
}
import org.apache.fop.fo.flow.TableRow;
import org.apache.fop.fo.pagination.Flow;
import org.apache.fop.fo.pagination.PageSequence;
+import org.apache.fop.layoutmgr.AddLMVisitor;
import org.apache.fop.layoutmgr.ContentLayoutManager;
import org.apache.fop.layoutmgr.InlineStackingLayoutManager;
import org.apache.fop.layoutmgr.LMiter;
*/
private long startTime;
+ /** Useful only for allowing subclasses of AddLMVisitor to be set by those
+ extending FOP **/
+ private AddLMVisitor addLMVisitor = null;
+
/**
* Main constructor
* @param foTreeControl the FOTreeControl implementation that governs this
// This will layout pages and add them to the area tree
PageLayoutManager pageLM = new PageLayoutManager(areaTree, pageSeq,
- getDocument());
+ this);
pageLM.setPageCounting(pageSeq.getCurrentPageNumber(),
pageSeq.getPageNumberGenerator());
return title;
}
+ /**
+ * Public accessor to set the AddLMVisitor object that should be used.
+ * This allows subclasses of AddLMVisitor to be used, which can be useful
+ * for extensions to the FO Tree.
+ * @param addLMVisitor the AddLMVisitor object that should be used.
+ */
+ public void setAddLMVisitor(AddLMVisitor addLMVisitor) {
+ this.addLMVisitor = addLMVisitor;
+ }
+
+ /**
+ * Public accessor to get the AddLMVisitor object that should be used.
+ * @return the AddLMVisitor object that should be used.
+ */
+ public AddLMVisitor getAddLMVisitor() {
+ if (this.addLMVisitor == null) {
+ this.addLMVisitor = new AddLMVisitor();
+ }
+ return this.addLMVisitor;
+ }
+
/**
*
* @param pagenum PageNumber that is starting.
import org.apache.fop.fo.FObj;
import org.apache.fop.apps.FOUserAgent;
-import org.apache.fop.apps.Document;
-import org.apache.fop.fo.flow.Marker;
import org.apache.fop.area.Area;
import org.apache.fop.area.Resolveable;
import org.apache.fop.area.PageViewport;
import org.apache.fop.fo.Constants;
+import org.apache.fop.fo.flow.Marker;
+import org.apache.fop.fo.FOTreeHandler;
import org.apache.fop.fo.PropertyManager;
import org.apache.commons.logging.Log;
return this.parentLM;
}
- public Document getDocument() {
- return getParent().getDocument();
+ public FOTreeHandler getFOTreeHandler() {
+ return getParent().getFOTreeHandler();
}
// /**
package org.apache.fop.layoutmgr;
import org.apache.fop.fo.FObj;
-import org.apache.fop.apps.Document;
+import org.apache.fop.fo.FOTreeHandler;
import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.fo.flow.Marker;
import org.apache.fop.area.Area;
return this.parentLM;
}
- public Document getDocument() {
- return getParent().getDocument();
+ public FOTreeHandler getFOTreeHandler() {
+ return getParent().getFOTreeHandler();
}
/** @see org.apache.fop.layoutmgr.LayoutManager */
}
protected boolean preLoadNext() {
- AddLMVisitor addLMVisitor = lp.getDocument().getAddLMVisitor();
+ AddLMVisitor addLMVisitor = lp.getFOTreeHandler().getAddLMVisitor();
// skip over child FObj's that don't add lms
while (baseIter != null && baseIter.hasNext()) {
Object theobj = baseIter.next();
import org.apache.fop.area.PageViewport;
import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.fo.FObj;
+import org.apache.fop.fo.FOTreeHandler;
/**
* The interface for all LayoutManagers.
LayoutManager getParent();
/**
- * Get the Document object that is at the top of the LM Tree
- * @return the Document object that is at the top of the LM Tree
+ * Get the FOTreeHandler object that is activating the LM Tree
+ * @return the FOTreeHandler object
*/
- org.apache.fop.apps.Document getDocument();
+ FOTreeHandler getFOTreeHandler();
/**
* Initialize this layout manager.
package org.apache.fop.layoutmgr;
-import org.apache.fop.apps.Document;
import org.apache.fop.apps.FOPException;
import org.apache.fop.area.CTM;
import org.apache.fop.datatypes.FODimension;
import org.apache.fop.fo.FObj;
+import org.apache.fop.fo.FOTreeHandler;
import org.apache.fop.fo.Constants;
import org.apache.fop.fo.flow.Marker;
import org.apache.fop.fo.pagination.PageNumberGenerator;
*/
private AreaTree areaTree;
private PageSequence pageSequence;
- private Document doc;
+ private FOTreeHandler foTreeHandler;
/**
* This is the SimplePageMaster that should be used to create the page. It
* @param pageseq the page sequence fo
*/
public PageLayoutManager(AreaTree areaTree, PageSequence pageseq,
- Document doc) {
+ FOTreeHandler foTreeHandler) {
super(pageseq);
this.areaTree = areaTree;
pageSequence = pageseq;
- this.doc = doc;
+ this.foTreeHandler = foTreeHandler;
}
/**
}
/**
- * @return the apps.Document object controlling this generation
+ * @return the apps.FOTreeHandler object controlling this generation
*/
- public Document getDocument() {
- return doc;
+ public FOTreeHandler getFOTreeHandler() {
+ return foTreeHandler;
}
}