From 7fb9e3d98de00b203c3e943753068134eb8d1cba Mon Sep 17 00:00:00 2001 From: Peter Bernard West Date: Tue, 4 May 2004 07:46:45 +0000 Subject: [PATCH] Completed preparations for null page construction git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197563 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/area/Page.java | 99 +++++++++++-------- src/java/org/apache/fop/area/PageRefArea.java | 40 +++++++- .../org/apache/fop/area/PageViewport.java | 70 +++++++------ .../apache/fop/area/RegionAfterRefArea.java | 20 ++-- .../org/apache/fop/area/RegionAfterVport.java | 21 ++-- .../apache/fop/area/RegionBeforeRefArea.java | 20 ++-- .../apache/fop/area/RegionBeforeVport.java | 22 ++--- .../apache/fop/area/RegionBodyRefArea.java | 22 ++--- .../org/apache/fop/area/RegionBodyVport.java | 22 ++--- .../org/apache/fop/area/RegionEndRefArea.java | 20 ++-- .../org/apache/fop/area/RegionEndVport.java | 22 ++--- .../apache/fop/area/RegionStartRefArea.java | 20 ++-- .../org/apache/fop/area/RegionStartVport.java | 22 ++--- 13 files changed, 199 insertions(+), 221 deletions(-) diff --git a/src/java/org/apache/fop/area/Page.java b/src/java/org/apache/fop/area/Page.java index 91eeb1137..1f7f74ec6 100644 --- a/src/java/org/apache/fop/area/Page.java +++ b/src/java/org/apache/fop/area/Page.java @@ -26,7 +26,6 @@ import java.util.List; import java.util.Map; import org.apache.fop.datastructs.Node; -import org.apache.fop.fo.FONode; import org.apache.fop.fo.flow.FoPageSequence; import org.apache.fop.fo.pagination.FoSimplePageMaster; import org.apache.fop.fo.properties.RetrievePosition; @@ -48,9 +47,9 @@ public class Page extends AreaNode implements Cloneable { */ public Page( FoPageSequence pageSeq, - FONode generatedBy, long pageId) { - super(pageSeq, generatedBy); + // the page-sequence is the generated-by node + super(pageSeq, pageSeq); this.pageId = pageId; } @@ -62,14 +61,35 @@ public class Page extends AreaNode implements Cloneable { */ public Page( FoPageSequence pageSeq, - FONode generatedBy, long pageId, Node parent, Object sync) { - super(pageSeq, generatedBy, parent, sync); + // the page-sequence is the generated-by node + super(pageSeq, pageSeq, parent, sync); this.pageId = pageId; } + /** Unique ID for this page. 0 is an invalid ID. */ + private long pageId = 0; + + /** + * @return the pageId + */ + public long getPageId() { + synchronized (sync) { + return pageId; + } + } + + /** + * @param pageId to set + */ + public void setPageId(long pageId) { + synchronized (sync) { + this.pageId = pageId; + } + } + /** * Creates a null page, consisting of * * */ - public void setupNullPage() { - + public static Page setupNullPage(FoPageSequence pageSeq, long id) { + Page page = new Page(pageSeq, id); + page.setVport(PageViewport.nullPageVport(pageSeq, page, page)); + return page; } - /** The simple-page-master that generated this page. */ - protected FoSimplePageMaster pageMaster = null; - /** Unique ID for this page. 0 is an invalid ID. */ - private long pageId = 0; - /** The formatted page number */ - private String pageNumber = null; - - // list of id references and the rectangle on the page - private Map idReferences = null; - - // this keeps a list of currently unresolved areas or extensions - // once the thing is resolved it is removed - // when this is empty the page can be rendered - private Map unresolved = null; - - private Map pendingResolved = null; - - // hashmap of markers for this page - // start and end are added by the fo that contains the markers - private Map markerFirstStart = null; - private Map markerLastStart = null; - private Map markerFirstAny = null; - private Map markerLastEnd = null; - private Map markerLastAny = null; + protected FoSimplePageMaster pageMaster = null; + /** The single page-viewport child of this page */ + protected PageViewport vport = null; /** - * @return the pageId + * @return the vport */ - public long getPageId() { - synchronized (sync) { - return pageId; - } + public PageViewport getVport() { + return vport; } - /** - * @param pageId to set + * @param vport to set */ - public void setPageId(long pageId) { - synchronized (sync) { - this.pageId = pageId; - } + public void setVport(PageViewport vport) { + this.vport = vport; } + /** The formatted page number */ + private String pageNumber = null; /** * Set the page number for this page. @@ -163,6 +161,16 @@ public class Page extends AreaNode implements Cloneable { } } + // list of id references and the rectangle on the page + private Map idReferences = null; + + // this keeps a list of currently unresolved areas or extensions + // once the thing is resolved it is removed + // when this is empty the page can be rendered + private Map unresolved = null; + + private Map pendingResolved = null; + /** * Add an unresolved id to this page. * All unresolved ids for the contents of this page are @@ -195,6 +203,13 @@ public class Page extends AreaNode implements Cloneable { } } + // hashmap of markers for this page + // start and end are added by the fo that contains the markers + private Map markerFirstStart = null; + private Map markerLastStart = null; + private Map markerFirstAny = null; + private Map markerLastEnd = null; + private Map markerLastAny = null; /** * Add the markers for this page. diff --git a/src/java/org/apache/fop/area/PageRefArea.java b/src/java/org/apache/fop/area/PageRefArea.java index e8e70664d..a7136e3c5 100644 --- a/src/java/org/apache/fop/area/PageRefArea.java +++ b/src/java/org/apache/fop/area/PageRefArea.java @@ -21,7 +21,6 @@ import java.io.Serializable; //import java.util.Map; import org.apache.fop.datastructs.Node; -import org.apache.fop.fo.FONode; import org.apache.fop.fo.flow.FoPageSequence; /** @@ -44,12 +43,47 @@ implements ReferenceArea, Serializable { // // temporary map of unresolved objects used when serializing the page // private Map unresolved = null; + /** + * Create a page-reference-area with a null rectangular area + * and region-reference-areas. + * @param pageSeq + * @param parent + * @param sync + */ public PageRefArea( FoPageSequence pageSeq, - FONode generatedBy, Node parent, Object sync) { - super(pageSeq, generatedBy, parent, sync); + // the page-sequence is the generated-by node + super(pageSeq, pageSeq, parent, sync); + } + + /** + * Creates and returns a PageRefArea with no rectangular + * area. The area created references null region viewports for + * region-body, region-before, region-after, region-start and + * region-end. + * N.B. this is a static method. + * @param pageSeq the page-sequence to which this area belongs + * @param parent the page-viewport-area + * @param sync + * @return the created reference area + */ + public static PageRefArea nullPageRef( + FoPageSequence pageSeq, Node parent, Object sync) { + PageRefArea pageRef = + new PageRefArea(pageSeq, parent, sync); + pageRef.setRegionBody(RegionBodyVport.nullRegionBodyVport( + pageSeq, pageRef, sync)); + pageRef.setRegionBefore(RegionBeforeVport.nullRegionBeforeVport( + pageSeq, pageRef, sync)); + pageRef.setRegionAfter(RegionAfterVport.nullRegionAfterVport( + pageSeq, pageRef, sync)); + pageRef.setRegionStart(RegionStartVport.nullRegionStartVport( + pageSeq, pageRef, sync)); + pageRef.setRegionEnd(RegionEndVport.nullRegionEndVport( + pageSeq, pageRef, sync)); + return pageRef; } // /** diff --git a/src/java/org/apache/fop/area/PageViewport.java b/src/java/org/apache/fop/area/PageViewport.java index 73ed813a3..79fe3cc4f 100644 --- a/src/java/org/apache/fop/area/PageViewport.java +++ b/src/java/org/apache/fop/area/PageViewport.java @@ -20,7 +20,6 @@ package org.apache.fop.area; import java.awt.geom.Rectangle2D; import org.apache.fop.datastructs.Node; -import org.apache.fop.fo.FONode; import org.apache.fop.fo.flow.FoPageSequence; /** @@ -37,57 +36,68 @@ extends AbstractViewport implements Viewport { /** - * Create a page viewport at the root of a tree, synchronized on itself, - * with a given page reference area and viewport dimensions - * @param pageId - * @param p the page reference area for the contents of this page - * @param bounds the dimensions of the viewport + * Creates a page viewport at the root of a tree, synchronized on itself, + * with a null page reference area and rectangular area + * @param pageSeq the page-sequence which generated this area + * the page-sequence */ public PageViewport( - FoPageSequence pageSeq, - FONode generatedBy, - long pageId, - Rectangle2D bounds, - PageRefArea p) { - super(bounds, pageSeq, generatedBy); - refArea = p; + FoPageSequence pageSeq) { + // The pageSeq is also the generating node + super(pageSeq, pageSeq); } /** - * Create a page viewport. - * @param parent node of this viewport - * @param sync object on which the Area is synchronized - * @param pageId the unique identifier of this page - * @param p the page reference area for the contents of this page - * @param bounds the dimensions of the viewport + * Creates a page viewport, with a null page reference area and the given + * rectangular area + * @param area the rectangular area + * @param pageSeq the page-sequence which generated this area + * @param parent + * @param sync */ public PageViewport( + Rectangle2D area, FoPageSequence pageSeq, - FONode generatedBy, - long pageId, - Rectangle2D bounds, - PageRefArea p, Node parent, Object sync) { - super(bounds, pageSeq, generatedBy, parent, sync); - refArea = p; + // The pageSeq is also the generating node + super(area, pageSeq, pageSeq, parent, sync); } /** - * Create a page viewport with a given parent node, sync object and ID + * Creates a page viewport with a null page ref area and rectangular area, + * and the given parent node and sync object + * @param pageSeq the page-sequence which generated this viewport. This is + * also the generated-by node * @param parent * @param sync - * @param pageId */ public PageViewport( FoPageSequence pageSeq, - FONode generatedBy, - long pageId, Node parent, Object sync) { - super(pageSeq, generatedBy, parent, sync); + // The pageSeq is also the generating node + super(pageSeq, pageSeq, parent, sync); refArea = null; } + + /** + * Creates and returns a PageViewport with no rectangular + * area. The area created references a null PageRefArea. + * N.B. this is a static method. + * @param pageSeq the page-sequence to which this area belongs + * @param parent the Page object + * @param sync + * @return the created viewport area + */ + public static PageViewport nullPageVport( + FoPageSequence pageSeq, Node parent, Object sync) { + PageViewport vport = + new PageViewport(pageSeq, parent, sync); + vport.setReferenceArea(PageRefArea.nullPageRef( + pageSeq, vport, sync)); + return vport; + } /** * Get the page reference area with the contents. diff --git a/src/java/org/apache/fop/area/RegionAfterRefArea.java b/src/java/org/apache/fop/area/RegionAfterRefArea.java index 67a84d9e0..e8069b753 100644 --- a/src/java/org/apache/fop/area/RegionAfterRefArea.java +++ b/src/java/org/apache/fop/area/RegionAfterRefArea.java @@ -22,7 +22,6 @@ package org.apache.fop.area; import java.awt.geom.Rectangle2D; import org.apache.fop.datastructs.Node; -import org.apache.fop.fo.FONode; import org.apache.fop.fo.flow.FoPageSequence; /** @@ -36,35 +35,31 @@ public class RegionAfterRefArea /** * Creates a new region-after area with no defined rectangular area * @param pageSeq the generating page-sequence - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the page-reference-area * @param sync */ public RegionAfterRefArea( FoPageSequence pageSeq, - FONode generatedBy, Node parent, Object sync) { - super(pageSeq, generatedBy, parent, sync); + // the page-sequence is the generated-by node + super(pageSeq, pageSeq, parent, sync); } /** * Creates a new region-after area with the given rectangular area * @param area the rectangular area * @param pageSeq the generating page-sequence - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the page-reference-area * @param sync */ public RegionAfterRefArea( Rectangle2D area, FoPageSequence pageSeq, - FONode generatedBy, Node parent, Object sync) { - super(area, pageSeq, generatedBy, parent, sync); + // the page-sequence is the generated-by node + super(area, pageSeq, pageSeq, parent, sync); } /** @@ -72,17 +67,14 @@ public class RegionAfterRefArea * rectangular area. * N.B. this is a static method. * @param pageSeq the page-sequence to which this area belongs - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the region-body-viewport-area * @param sync * @return the created reference area */ public static RegionAfterRefArea nullRegionAfterRef( - FoPageSequence pageSeq, FONode generatedBy, - Node parent, Object sync) { + FoPageSequence pageSeq, Node parent, Object sync) { RegionAfterRefArea afterRef = - new RegionAfterRefArea(pageSeq, generatedBy, parent, sync); + new RegionAfterRefArea(pageSeq, parent, sync); return afterRef; } diff --git a/src/java/org/apache/fop/area/RegionAfterVport.java b/src/java/org/apache/fop/area/RegionAfterVport.java index 7a87032b4..2f2726358 100644 --- a/src/java/org/apache/fop/area/RegionAfterVport.java +++ b/src/java/org/apache/fop/area/RegionAfterVport.java @@ -22,7 +22,6 @@ package org.apache.fop.area; import java.awt.geom.Rectangle2D; import org.apache.fop.datastructs.Node; -import org.apache.fop.fo.FONode; import org.apache.fop.fo.flow.FoPageSequence; /** @@ -34,35 +33,30 @@ public class RegionAfterVport extends RegionViewport { /** * Creates a new region-after area with no defined rectangular area * @param pageSeq the generating page-sequence - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the page-reference-area * @param sync */ public RegionAfterVport( FoPageSequence pageSeq, - FONode generatedBy, Node parent, Object sync) { - super(pageSeq, generatedBy, parent, sync); + // the page-sequence is the generated-by node + super(pageSeq, pageSeq, parent, sync); } /** * Creates a new region-after area with the defined rectangular area * @param area the rectangular area * @param pageSeq the generating page-sequence - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the page-reference-area * @param sync */ public RegionAfterVport( Rectangle2D area, FoPageSequence pageSeq, - FONode generatedBy, Node parent, Object sync) { - super(area, pageSeq, generatedBy, parent, sync); + super(area, pageSeq, pageSeq, parent, sync); } /** @@ -70,19 +64,16 @@ public class RegionAfterVport extends RegionViewport { * rectangular area. * N.B. this is a static method. * @param pageSeq the page-sequence to which this area belongs - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the region-body-viewport-area * @param sync * @return the created reference area */ public static RegionAfterVport nullRegionAfterVport( - FoPageSequence pageSeq, FONode generatedBy, - Node parent, Object sync) { + FoPageSequence pageSeq, Node parent, Object sync) { RegionAfterVport vport = - new RegionAfterVport(pageSeq, generatedBy, parent, sync); + new RegionAfterVport(pageSeq, parent, sync); vport.setRegion(RegionAfterRefArea.nullRegionAfterRef( - pageSeq, generatedBy, vport, sync)); + pageSeq, vport, sync)); return vport; } diff --git a/src/java/org/apache/fop/area/RegionBeforeRefArea.java b/src/java/org/apache/fop/area/RegionBeforeRefArea.java index 6be363ee3..0e08587de 100644 --- a/src/java/org/apache/fop/area/RegionBeforeRefArea.java +++ b/src/java/org/apache/fop/area/RegionBeforeRefArea.java @@ -22,7 +22,6 @@ package org.apache.fop.area; import java.awt.geom.Rectangle2D; import org.apache.fop.datastructs.Node; -import org.apache.fop.fo.FONode; import org.apache.fop.fo.flow.FoPageSequence; /** @@ -36,35 +35,31 @@ public class RegionBeforeRefArea /** * Creates a new region-before area with no defined rectangular area * @param pageSeq the generating page-sequence - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the page-reference-area * @param sync */ public RegionBeforeRefArea( FoPageSequence pageSeq, - FONode generatedBy, Node parent, Object sync) { - super(pageSeq, generatedBy, parent, sync); + // the page-sequence is the generated-by node + super(pageSeq, pageSeq, parent, sync); } /** * Creates a new region-before area with the given rectangular area * @param area the rectangular area * @param pageSeq the generating page-sequence - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the page-reference-area * @param sync */ public RegionBeforeRefArea( Rectangle2D area, FoPageSequence pageSeq, - FONode generatedBy, Node parent, Object sync) { - super(area, pageSeq, generatedBy, parent, sync); + // the page-sequence is the generated-by node + super(area, pageSeq, pageSeq, parent, sync); } /** @@ -72,17 +67,14 @@ public class RegionBeforeRefArea * rectangular area. * N.B. this is a static method. * @param pageSeq the page-sequence to which this area belongs - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the region-body-viewport-area * @param sync * @return the created reference area */ public static RegionBeforeRefArea nullRegionBeforeRef( - FoPageSequence pageSeq, FONode generatedBy, - Node parent, Object sync) { + FoPageSequence pageSeq, Node parent, Object sync) { RegionBeforeRefArea beforeRef = - new RegionBeforeRefArea(pageSeq, generatedBy, parent, sync); + new RegionBeforeRefArea(pageSeq, parent, sync); return beforeRef; } diff --git a/src/java/org/apache/fop/area/RegionBeforeVport.java b/src/java/org/apache/fop/area/RegionBeforeVport.java index a681c9b95..d1e24a92b 100644 --- a/src/java/org/apache/fop/area/RegionBeforeVport.java +++ b/src/java/org/apache/fop/area/RegionBeforeVport.java @@ -22,7 +22,6 @@ package org.apache.fop.area; import java.awt.geom.Rectangle2D; import org.apache.fop.datastructs.Node; -import org.apache.fop.fo.FONode; import org.apache.fop.fo.flow.FoPageSequence; /** @@ -34,35 +33,31 @@ public class RegionBeforeVport extends RegionViewport { /** * Creates a new region-before area with no defined rectangular area * @param pageSeq the generating page-sequence - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the page-reference-area * @param sync */ public RegionBeforeVport( FoPageSequence pageSeq, - FONode generatedBy, Node parent, Object sync) { - super(pageSeq, generatedBy, parent, sync); + // the page-sequence is the generated-by node + super(pageSeq, pageSeq, parent, sync); } /** * Creates a new region-before area with the defined rectangular area * @param area the rectangular area * @param pageSeq the generating page-sequence - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the page-reference-area * @param sync */ public RegionBeforeVport( Rectangle2D area, FoPageSequence pageSeq, - FONode generatedBy, Node parent, Object sync) { - super(area, pageSeq, generatedBy, parent, sync); + // the page-sequence is the generated-by node + super(area, pageSeq, pageSeq, parent, sync); } /** @@ -70,19 +65,16 @@ public class RegionBeforeVport extends RegionViewport { * rectangular area. * N.B. this is a static method. * @param pageSeq the page-sequence to which this area belongs - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the region-body-viewport-area * @param sync * @return the created reference area */ public static RegionBeforeVport nullRegionBeforeVport( - FoPageSequence pageSeq, FONode generatedBy, - Node parent, Object sync) { + FoPageSequence pageSeq, Node parent, Object sync) { RegionBeforeVport vport = - new RegionBeforeVport(pageSeq, generatedBy, parent, sync); + new RegionBeforeVport(pageSeq, parent, sync); vport.setRegion(RegionBeforeRefArea.nullRegionBeforeRef( - pageSeq, generatedBy, vport, sync)); + pageSeq, vport, sync)); return vport; } diff --git a/src/java/org/apache/fop/area/RegionBodyRefArea.java b/src/java/org/apache/fop/area/RegionBodyRefArea.java index e87ad5f2f..483dcf3fa 100644 --- a/src/java/org/apache/fop/area/RegionBodyRefArea.java +++ b/src/java/org/apache/fop/area/RegionBodyRefArea.java @@ -20,7 +20,6 @@ package org.apache.fop.area; import java.awt.geom.Rectangle2D; import org.apache.fop.datastructs.Node; -import org.apache.fop.fo.FONode; import org.apache.fop.fo.flow.FoPageSequence; /** @@ -42,17 +41,15 @@ implements ReferenceArea { * default column count and gap * This sets the region reference area class to BODY. * @param pageSeq the generating page-sequence - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the page-reference-area * @param sync */ public RegionBodyRefArea( FoPageSequence pageSeq, - FONode generatedBy, Node parent, Object sync) { - super(pageSeq, generatedBy, parent, sync); + // the page-sequence is the generated-by node + super(pageSeq, pageSeq, parent, sync); } /** @@ -63,8 +60,6 @@ implements ReferenceArea { * @param columnGap * @param area the rectangular area * @param pageSeq the generating page-sequence - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the page-reference-area * @param sync */ @@ -73,10 +68,10 @@ implements ReferenceArea { int columnGap, Rectangle2D area, FoPageSequence pageSeq, - FONode generatedBy, Node parent, Object sync) { - super(area, pageSeq, generatedBy, parent, sync); + // the page-sequence is the generated-by node + super(area, pageSeq, pageSeq, parent, sync); this.columnCount = columnCount; this.columnGap = columnGap; } @@ -86,19 +81,16 @@ implements ReferenceArea { * area. The area created references a null MainReferenceArea. * N.B. this is a static method. * @param pageSeq the page-sequence to which this area belongs - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the region-body-viewport-area * @param sync * @return the created reference area */ public static RegionBodyRefArea nullRegionBodyRef( - FoPageSequence pageSeq, FONode generatedBy, - Node parent, Object sync) { + FoPageSequence pageSeq, Node parent, Object sync) { RegionBodyRefArea bodyRef = - new RegionBodyRefArea(pageSeq, generatedBy, parent, sync); + new RegionBodyRefArea(pageSeq, parent, sync); bodyRef.setMainReference(MainReferenceArea.nullMainRefArea( - pageSeq, generatedBy, bodyRef, sync)); + pageSeq, pageSeq, bodyRef, sync)); return bodyRef; } /** diff --git a/src/java/org/apache/fop/area/RegionBodyVport.java b/src/java/org/apache/fop/area/RegionBodyVport.java index 2b6dbabc3..06d1a4fe4 100644 --- a/src/java/org/apache/fop/area/RegionBodyVport.java +++ b/src/java/org/apache/fop/area/RegionBodyVport.java @@ -22,7 +22,6 @@ package org.apache.fop.area; import java.awt.geom.Rectangle2D; import org.apache.fop.datastructs.Node; -import org.apache.fop.fo.FONode; import org.apache.fop.fo.flow.FoPageSequence; /** @@ -36,54 +35,47 @@ public class RegionBodyVport extends RegionViewport { * area * @param area the rectangular area * @param pageSeq the generating page-sequence - * @param generatedBy * @param parent * @param sync */ public RegionBodyVport( Rectangle2D area, FoPageSequence pageSeq, - FONode generatedBy, Node parent, Object sync) { - super(area, pageSeq, generatedBy, parent, sync); + // the page-sequence is the generated-by node + super(area, pageSeq, pageSeq, parent, sync); } /** * Creates a region-body-viewport with no rectangular area * @param pageSeq the generating page-sequence - * @param generatedBy * @param parent * @param sync */ public RegionBodyVport( FoPageSequence pageSeq, - FONode generatedBy, Node parent, Object sync) { - super(pageSeq, generatedBy, parent, sync); + // the page-sequence is the generated-by node + super(pageSeq, pageSeq, parent, sync); } - /** - /** * Creates and returns a RegionBodyVport with no rectangular * area. The area created references a null RegionBodyRefArea. * N.B. this is a static method. * @param pageSeq the page-sequence to which this area belongs - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the page-reference-area * @param sync * @return the created reference area */ public static RegionBodyVport nullRegionBodyVport( - FoPageSequence pageSeq, FONode generatedBy, - Node parent, Object sync) { + FoPageSequence pageSeq, Node parent, Object sync) { RegionBodyVport vport = - new RegionBodyVport(pageSeq, generatedBy, parent, sync); + new RegionBodyVport(pageSeq, parent, sync); vport.setRegion(RegionBodyRefArea.nullRegionBodyRef( - pageSeq, generatedBy, vport, sync)); + pageSeq, vport, sync)); return vport; } } diff --git a/src/java/org/apache/fop/area/RegionEndRefArea.java b/src/java/org/apache/fop/area/RegionEndRefArea.java index 160caf5d3..e1864f7d7 100644 --- a/src/java/org/apache/fop/area/RegionEndRefArea.java +++ b/src/java/org/apache/fop/area/RegionEndRefArea.java @@ -22,7 +22,6 @@ package org.apache.fop.area; import java.awt.geom.Rectangle2D; import org.apache.fop.datastructs.Node; -import org.apache.fop.fo.FONode; import org.apache.fop.fo.flow.FoPageSequence; /** @@ -36,35 +35,31 @@ implements ReferenceArea { /** * Creates a new region-end area with no defined rectangular area * @param pageSeq the generating page-sequence - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the page-reference-area * @param sync */ public RegionEndRefArea( FoPageSequence pageSeq, - FONode generatedBy, Node parent, Object sync) { - super(pageSeq, generatedBy, parent, sync); + // the page-sequence is the generated-by node + super(pageSeq, pageSeq, parent, sync); } /** * Creates a new region-end area with the given rectangular area * @param area the rectangular area * @param pageSeq the generating page-sequence - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the page-reference-area * @param sync */ public RegionEndRefArea( Rectangle2D area, FoPageSequence pageSeq, - FONode generatedBy, Node parent, Object sync) { - super(area, pageSeq, generatedBy, parent, sync); + // the page-sequence is the generated-by node + super(area, pageSeq, pageSeq, parent, sync); } /** @@ -72,17 +67,14 @@ implements ReferenceArea { * rectangular area. * N.B. this is a static method. * @param pageSeq the page-sequence to which this area belongs - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the region-body-viewport-area * @param sync * @return the created reference area */ public static RegionEndRefArea nullRegionEndRef( - FoPageSequence pageSeq, FONode generatedBy, - Node parent, Object sync) { + FoPageSequence pageSeq, Node parent, Object sync) { RegionEndRefArea endRef = - new RegionEndRefArea(pageSeq, generatedBy, parent, sync); + new RegionEndRefArea(pageSeq, parent, sync); return endRef; } diff --git a/src/java/org/apache/fop/area/RegionEndVport.java b/src/java/org/apache/fop/area/RegionEndVport.java index e7e71f7d0..f6b884525 100644 --- a/src/java/org/apache/fop/area/RegionEndVport.java +++ b/src/java/org/apache/fop/area/RegionEndVport.java @@ -22,7 +22,6 @@ package org.apache.fop.area; import java.awt.geom.Rectangle2D; import org.apache.fop.datastructs.Node; -import org.apache.fop.fo.FONode; import org.apache.fop.fo.flow.FoPageSequence; /** @@ -34,35 +33,31 @@ public class RegionEndVport extends RegionViewport { /** * Creates a new region-end area with no defined rectangular area * @param pageSeq the generating page-sequence - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the page-reference-area * @param sync */ public RegionEndVport( FoPageSequence pageSeq, - FONode generatedBy, Node parent, Object sync) { - super(pageSeq, generatedBy, parent, sync); + // the page-sequence is the generated-by node + super(pageSeq, pageSeq, parent, sync); } /** * Creates a new region-end area with the defined rectangular area * @param area the rectangular area * @param pageSeq the generating page-sequence - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the page-reference-area * @param sync */ public RegionEndVport( Rectangle2D area, FoPageSequence pageSeq, - FONode generatedBy, Node parent, Object sync) { - super(area, pageSeq, generatedBy, parent, sync); + // the page-sequence is the generated-by node + super(area, pageSeq, pageSeq, parent, sync); } /** @@ -70,19 +65,16 @@ public class RegionEndVport extends RegionViewport { * rectangular area. * N.B. this is a static method. * @param pageSeq the page-sequence to which this area belongs - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the region-body-viewport-area * @param sync * @return the created reference area */ public static RegionEndVport nullRegionEndVport( - FoPageSequence pageSeq, FONode generatedBy, - Node parent, Object sync) { + FoPageSequence pageSeq, Node parent, Object sync) { RegionEndVport vport = - new RegionEndVport(pageSeq, generatedBy, parent, sync); + new RegionEndVport(pageSeq, parent, sync); vport.setRegion(RegionEndRefArea.nullRegionEndRef( - pageSeq, generatedBy, vport, sync)); + pageSeq, vport, sync)); return vport; } diff --git a/src/java/org/apache/fop/area/RegionStartRefArea.java b/src/java/org/apache/fop/area/RegionStartRefArea.java index b7a316505..a7dffdd6d 100644 --- a/src/java/org/apache/fop/area/RegionStartRefArea.java +++ b/src/java/org/apache/fop/area/RegionStartRefArea.java @@ -22,7 +22,6 @@ package org.apache.fop.area; import java.awt.geom.Rectangle2D; import org.apache.fop.datastructs.Node; -import org.apache.fop.fo.FONode; import org.apache.fop.fo.flow.FoPageSequence; /** @@ -36,35 +35,31 @@ public class RegionStartRefArea /** * Creates a new region-start area with no defined rectangular area * @param pageSeq the generating page-sequence - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the page-reference-area * @param sync */ public RegionStartRefArea( FoPageSequence pageSeq, - FONode generatedBy, Node parent, Object sync) { - super(pageSeq, generatedBy, parent, sync); + // the page-sequence is the generated-by node + super(pageSeq, pageSeq, parent, sync); } /** * Creates a new region-start area with the given rectangular area * @param area the rectangular area * @param pageSeq the generating page-sequence - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the page-reference-area * @param sync */ public RegionStartRefArea( Rectangle2D area, FoPageSequence pageSeq, - FONode generatedBy, Node parent, Object sync) { - super(area, pageSeq, generatedBy, parent, sync); + // the page-sequence is the generated-by node + super(area, pageSeq, pageSeq, parent, sync); } /** @@ -72,17 +67,14 @@ public class RegionStartRefArea * rectangular area. * N.B. this is a static method. * @param pageSeq the page-sequence to which this area belongs - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the region-body-viewport-area * @param sync * @return the created reference area */ public static RegionStartRefArea nullRegionStartRef( - FoPageSequence pageSeq, FONode generatedBy, - Node parent, Object sync) { + FoPageSequence pageSeq, Node parent, Object sync) { RegionStartRefArea startRef = - new RegionStartRefArea(pageSeq, generatedBy, parent, sync); + new RegionStartRefArea(pageSeq, parent, sync); return startRef; } diff --git a/src/java/org/apache/fop/area/RegionStartVport.java b/src/java/org/apache/fop/area/RegionStartVport.java index b8f411e45..f0f6d7ff7 100644 --- a/src/java/org/apache/fop/area/RegionStartVport.java +++ b/src/java/org/apache/fop/area/RegionStartVport.java @@ -22,7 +22,6 @@ package org.apache.fop.area; import java.awt.geom.Rectangle2D; import org.apache.fop.datastructs.Node; -import org.apache.fop.fo.FONode; import org.apache.fop.fo.flow.FoPageSequence; /** @@ -34,35 +33,31 @@ public class RegionStartVport extends RegionViewport { /** * Creates a new region-start area with no defined rectangular area * @param pageSeq the generating page-sequence - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the page-reference-area * @param sync */ public RegionStartVport( FoPageSequence pageSeq, - FONode generatedBy, Node parent, Object sync) { - super(pageSeq, generatedBy, parent, sync); + // the page-sequence is the generated-by node + super(pageSeq, pageSeq, parent, sync); } /** * Creates a new region-start area with the defined rectangular area * @param area the rectangular area * @param pageSeq the generating page-sequence - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the page-reference-area * @param sync */ public RegionStartVport( Rectangle2D area, FoPageSequence pageSeq, - FONode generatedBy, Node parent, Object sync) { - super(area, pageSeq, generatedBy, parent, sync); + // the page-sequence is the generated-by node + super(area, pageSeq, pageSeq, parent, sync); } /** @@ -70,19 +65,16 @@ public class RegionStartVport extends RegionViewport { * rectangular area. * N.B. this is a static method. * @param pageSeq the page-sequence to which this area belongs - * @param generatedBy the node which generated this reference area; in this - * case, the page-sequence * @param parent the region-body-viewport-area * @param sync * @return the created reference area */ public static RegionStartVport nullRegionStartVport( - FoPageSequence pageSeq, FONode generatedBy, - Node parent, Object sync) { + FoPageSequence pageSeq, Node parent, Object sync) { RegionStartVport vport = - new RegionStartVport(pageSeq, generatedBy, parent, sync); + new RegionStartVport(pageSeq, parent, sync); vport.setRegion(RegionStartRefArea.nullRegionStartRef( - pageSeq, generatedBy, vport, sync)); + pageSeq, vport, sync)); return vport; } -- 2.39.5