diff options
Diffstat (limited to 'src/java/org/apache/fop/layoutmgr/Page.java')
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/Page.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/Page.java b/src/java/org/apache/fop/layoutmgr/Page.java index 5e9addd1e..6d6dbb233 100644 --- a/src/java/org/apache/fop/layoutmgr/Page.java +++ b/src/java/org/apache/fop/layoutmgr/Page.java @@ -19,6 +19,8 @@ package org.apache.fop.layoutmgr; +import java.awt.geom.Rectangle2D; + import org.apache.fop.area.PageViewport; import org.apache.fop.fo.pagination.SimplePageMaster; @@ -45,6 +47,18 @@ public class Page { this.pageViewport = new PageViewport(spm, pageNumber, pageNumberStr, blank); } + /** + * Auxiliary constructor used when there's no SimplePageMaster. + * @param viewArea the view area of the page + * @param pageNumber the page number (as an int) + * @param pageNumberStr the page number (as a String) + * @param blank true if this is a blank page + */ + public Page(Rectangle2D viewArea, int pageNumber, String pageNumberStr, boolean blank) { + this.spm = null; + this.pageViewport = new PageViewport(viewArea, pageNumber, pageNumberStr, null, blank); + } + /** @return the simple-page-master that created this page */ public SimplePageMaster getSimplePageMaster() { return this.spm; |