/*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
public BodyRegion() {
super(Constants.FO_REGION_BODY);
addTrait(Trait.IS_REFERENCE_AREA, Boolean.TRUE);
+ mainReference = new MainReference();
}
/**
import org.apache.fop.traits.MinOptMax;
/**
- * LayoutManager for a PageSequence and its flow.
- * It manages all page-related layout.
+ * LayoutManager for a PageSequence.
*/
public class PageSequenceLayoutManager extends AbstractLayoutManager {
private PageSequence pageSeq;
private int flowBPD = 0;
private int flowIPD = 0;
- /** Manager which handles a queue of all pages which are completely
- * laid out and ready for rendering, except for resolution of ID
- * references?
+ /**
+ * AreaTreeHandler which activates this PSLM.
*/
private AreaTreeHandler areaTreeHandler;
+
+ /**
+ * AreaTreeModel that this PSLM sends pages to.
+ */
private AreaTreeModel areaTreeModel;
/**
* This is the SimplePageMaster that should be used to create the page. It
* will be equal to the PageSequence's simplePageMaster, if it exists, or
* to the correct member of the PageSequence's pageSequenceMaster, if that
- * exists instead.
+ * is in effect instead.
*/
private SimplePageMaster currentSimplePageMaster;
//private HashMap staticContentLMs = new HashMap(4);
/**
- * This is the top level layout manager.
- * It is created by the PageSequence FO.
- *
- * @param pageseq the page sequence fo
+ * Constructor
+ *
+ * @param pageseq the page sequence fo to be laid out
*/
public PageSequenceLayoutManager(PageSequence pageSeq) {
super(pageSeq);
log.debug("Starting layout");
makeNewPage(false, false);
- createBodyMainReferenceArea();
createSpan(1);
flowIPD = curFlow.getIPD();
//numCols = curBody.getProperty(NUMBER_OF_COLUMNS);
}
if (curSpan == null) {
- createBodyMainReferenceArea();
bNeedSpan = true;
} else if (numCols != curSpan.getNormalFlowCount()) {
// todo: BALANCE EXISTING COLUMNS
}
}
- private void createBodyMainReferenceArea() {
- curBody.setMainReference(new MainReference());
- }
-
private void createSpan(int numCols) {
// check number of columns (= all in Body or 1)
// If already have a span, get its size and position (as MinMaxOpt)