aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGlen Mazza <gmazza@apache.org>2005-03-12 01:29:06 +0000
committerGlen Mazza <gmazza@apache.org>2005-03-12 01:29:06 +0000
commit0a11fbaf71d01c82f675e31f6ed07b905ddc4685 (patch)
treeed09f1b8cc667a476adc1a845736846f736f4a6a /src
parent1a54c8bc80dcb5a23f8112b480f3303665134b78 (diff)
downloadxmlgraphics-fop-0a11fbaf71d01c82f675e31f6ed07b905ddc4685.tar.gz
xmlgraphics-fop-0a11fbaf71d01c82f675e31f6ed07b905ddc4685.zip
Minor simplification to PSLM.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198483 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/java/org/apache/fop/area/BodyRegion.java3
-rw-r--r--src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java27
2 files changed, 13 insertions, 17 deletions
diff --git a/src/java/org/apache/fop/area/BodyRegion.java b/src/java/org/apache/fop/area/BodyRegion.java
index fbca171ce..60f6d2736 100644
--- a/src/java/org/apache/fop/area/BodyRegion.java
+++ b/src/java/org/apache/fop/area/BodyRegion.java
@@ -1,5 +1,5 @@
/*
- * 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.
@@ -40,6 +40,7 @@ public class BodyRegion extends RegionReference {
public BodyRegion() {
super(Constants.FO_REGION_BODY);
addTrait(Trait.IS_REFERENCE_AREA, Boolean.TRUE);
+ mainReference = new MainReference();
}
/**
diff --git a/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java b/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java
index 8d120e455..21c59460b 100644
--- a/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java
@@ -60,8 +60,7 @@ import java.awt.geom.Rectangle2D;
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;
@@ -95,18 +94,21 @@ public class PageSequenceLayoutManager extends AbstractLayoutManager {
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;
@@ -117,10 +119,9 @@ public class PageSequenceLayoutManager extends AbstractLayoutManager {
//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);
@@ -185,7 +186,6 @@ public class PageSequenceLayoutManager extends AbstractLayoutManager {
log.debug("Starting layout");
makeNewPage(false, false);
- createBodyMainReferenceArea();
createSpan(1);
flowIPD = curFlow.getIPD();
@@ -583,7 +583,6 @@ public class PageSequenceLayoutManager extends AbstractLayoutManager {
//numCols = curBody.getProperty(NUMBER_OF_COLUMNS);
}
if (curSpan == null) {
- createBodyMainReferenceArea();
bNeedSpan = true;
} else if (numCols != curSpan.getNormalFlowCount()) {
// todo: BALANCE EXISTING COLUMNS
@@ -697,10 +696,6 @@ public class PageSequenceLayoutManager extends AbstractLayoutManager {
}
}
- 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)