From 0777baf4ab97155a2aa2b9a5418f98d575e28c73 Mon Sep 17 00:00:00 2001 From: Joerg Pietschmann Date: Tue, 16 Jul 2002 19:13:26 +0000 Subject: [PATCH] Implementes background properties for all regions and precedence of regions (lr-tb writing mode only) Submitted by: Oleg Tkachenko olegt@multiconn.com Reviewed by: J.Pietschmann git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_20_2-maintain@195002 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/fop/fo/pagination/RegionAfter.java | 17 ++++ .../fop/fo/pagination/RegionBefore.java | 17 ++++ .../apache/fop/fo/pagination/RegionEnd.java | 13 +-- .../apache/fop/fo/pagination/RegionStart.java | 13 +-- .../fop/fo/pagination/SimplePageMaster.java | 88 +++++++++---------- src/org/apache/fop/layout/AreaContainer.java | 14 ++- src/org/apache/fop/layout/RegionArea.java | 6 +- .../apache/fop/render/AbstractRenderer.java | 56 ++++++++++++ src/org/apache/fop/render/Renderer.java | 5 ++ .../apache/fop/render/awt/AWTRenderer.java | 17 +--- .../apache/fop/render/mif/MIFRenderer.java | 6 +- .../apache/fop/render/pcl/PCLRenderer.java | 22 +---- .../apache/fop/render/pdf/PDFRenderer.java | 28 +----- src/org/apache/fop/render/ps/PSRenderer.java | 13 +-- .../apache/fop/render/svg/SVGRenderer.java | 16 +--- .../apache/fop/render/txt/TXTRenderer.java | 22 +---- .../apache/fop/render/xml/XMLRenderer.java | 28 ++++-- 17 files changed, 198 insertions(+), 183 deletions(-) diff --git a/src/org/apache/fop/fo/pagination/RegionAfter.java b/src/org/apache/fop/fo/pagination/RegionAfter.java index e88988707..3d2733423 100644 --- a/src/org/apache/fop/fo/pagination/RegionAfter.java +++ b/src/org/apache/fop/fo/pagination/RegionAfter.java @@ -65,6 +65,20 @@ public class RegionAfter extends Region { return area; } + RegionArea makeRegionArea(int allocationRectangleXPosition, + int allocationRectangleYPosition, + int allocationRectangleWidth, + int allocationRectangleHeight, + int startExtent, int endExtent) { + if (getPrecedence() == false) { + allocationRectangleXPosition += startExtent; + allocationRectangleWidth -= startExtent + endExtent; + } + return makeRegionArea(allocationRectangleXPosition, + allocationRectangleYPosition, + allocationRectangleWidth, + allocationRectangleHeight); + } protected String getDefaultRegionName() { return "xsl-region-after"; @@ -82,4 +96,7 @@ public class RegionAfter extends Region { return (precedence == Precedence.TRUE ? true : false); } + public int getExtent() { + return properties.get("extent").getLength().mvalue(); + } } diff --git a/src/org/apache/fop/fo/pagination/RegionBefore.java b/src/org/apache/fop/fo/pagination/RegionBefore.java index 75140d1ca..41c280a2a 100644 --- a/src/org/apache/fop/fo/pagination/RegionBefore.java +++ b/src/org/apache/fop/fo/pagination/RegionBefore.java @@ -65,6 +65,20 @@ public class RegionBefore extends Region { return area; } + RegionArea makeRegionArea(int allocationRectangleXPosition, + int allocationRectangleYPosition, + int allocationRectangleWidth, + int allocationRectangleHeight, + int startExtent, int endExtent) { + if (getPrecedence() == false) { + allocationRectangleXPosition += startExtent; + allocationRectangleWidth -= startExtent + endExtent; + } + return makeRegionArea(allocationRectangleXPosition, + allocationRectangleYPosition, + allocationRectangleWidth, + allocationRectangleHeight); + } protected String getDefaultRegionName() { return "xsl-region-before"; @@ -82,4 +96,7 @@ public class RegionBefore extends Region { return (precedence == Precedence.TRUE ? true : false); } + public int getExtent() { + return properties.get("extent").getLength().mvalue(); + } } diff --git a/src/org/apache/fop/fo/pagination/RegionEnd.java b/src/org/apache/fop/fo/pagination/RegionEnd.java index edff866fa..207c8ea29 100644 --- a/src/org/apache/fop/fo/pagination/RegionEnd.java +++ b/src/org/apache/fop/fo/pagination/RegionEnd.java @@ -43,18 +43,18 @@ public class RegionEnd extends Region { int allocationRectangleWidth, int allocationRectangleHeight, boolean beforePrecedence, - boolean afterPrecedence, int beforeHeight, - int afterHeight) { + boolean afterPrecedence, int beforeExtent, + int afterExtent) { int extent = this.properties.get("extent").getLength().mvalue(); int startY = allocationRectangleYPosition; int startH = allocationRectangleHeight; if (beforePrecedence) { - startY -= beforeHeight; - startH -= beforeHeight; + startY -= beforeExtent; + startH -= beforeExtent; } if (afterPrecedence) - startH -= afterHeight; + startH -= afterExtent; RegionArea area = new RegionArea(allocationRectangleXPosition + allocationRectangleWidth - extent, startY, extent, startH); @@ -98,4 +98,7 @@ public class RegionEnd extends Region { return REGION_CLASS; } + public int getExtent() { + return properties.get("extent").getLength().mvalue(); + } } diff --git a/src/org/apache/fop/fo/pagination/RegionStart.java b/src/org/apache/fop/fo/pagination/RegionStart.java index 6892669d5..f8b62cdcc 100644 --- a/src/org/apache/fop/fo/pagination/RegionStart.java +++ b/src/org/apache/fop/fo/pagination/RegionStart.java @@ -43,18 +43,18 @@ public class RegionStart extends Region { int allocationRectangleWidth, int allocationRectangleHeight, boolean beforePrecedence, - boolean afterPrecedence, int beforeHeight, - int afterHeight) { + boolean afterPrecedence, int beforeExtent, + int afterExtent) { int extent = this.properties.get("extent").getLength().mvalue(); int startY = allocationRectangleYPosition; int startH = allocationRectangleHeight; if (beforePrecedence) { - startY -= beforeHeight; - startH -= beforeHeight; + startY -= beforeExtent; + startH -= beforeExtent; } if (afterPrecedence) - startH -= afterHeight; + startH -= afterExtent; RegionArea area = new RegionArea(allocationRectangleXPosition, startY, extent, startH); area.setBackground(propMgr.getBackgroundProps()); @@ -96,4 +96,7 @@ public class RegionStart extends Region { return REGION_CLASS; } + public int getExtent() { + return properties.get("extent").getLength().mvalue(); + } } diff --git a/src/org/apache/fop/fo/pagination/SimplePageMaster.java b/src/org/apache/fop/fo/pagination/SimplePageMaster.java index 92586593c..2eaef15e4 100644 --- a/src/org/apache/fop/fo/pagination/SimplePageMaster.java +++ b/src/org/apache/fop/fo/pagination/SimplePageMaster.java @@ -43,10 +43,9 @@ public class SimplePageMaster extends FObj { String masterName; // before and after data as required by start and end - boolean beforePrecedence; - int beforeHeight; - boolean afterPrecedence; - int afterHeight; + boolean beforePrecedence = false; + int beforeExtent, afterExtent, startExtent, endExtent; + boolean afterPrecedence = false; protected SimplePageMaster(FObj parent, PropertyList propertyList) throws FOPException { @@ -88,63 +87,56 @@ public class SimplePageMaster extends FObj { - mProps.marginRight; int contentRectangleHeight = pageHeight - mProps.marginTop - mProps.marginBottom; - this.pageMaster = new PageMaster(pageWidth, pageHeight); - if (getRegion(RegionBody.REGION_CLASS) != null) { - BodyRegionArea body = - (BodyRegionArea)getRegion(RegionBody.REGION_CLASS).makeRegionArea(contentRectangleXPosition, - contentRectangleYPosition, - contentRectangleWidth, - contentRectangleHeight); - this.pageMaster.addBody(body); - } else { + Region body = getRegion(RegionBody.REGION_CLASS); + RegionBefore before = (RegionBefore)getRegion(RegionBefore.REGION_CLASS); + RegionAfter after = (RegionAfter)getRegion(RegionAfter.REGION_CLASS); + RegionStart start = (RegionStart)getRegion(RegionStart.REGION_CLASS); + RegionEnd end = (RegionEnd)getRegion(RegionEnd.REGION_CLASS); + if (before != null) { + beforePrecedence = before.getPrecedence(); + beforeExtent = before.getExtent(); + } + if (after != null) { + afterPrecedence = after.getPrecedence(); + afterExtent = after.getExtent(); + } + if (start != null) + startExtent = start.getExtent(); + if (end != null) + endExtent = end.getExtent(); + + if (body != null) + this.pageMaster.addBody((BodyRegionArea)body.makeRegionArea( + contentRectangleXPosition, + contentRectangleYPosition, + contentRectangleWidth, + contentRectangleHeight)); + else log.error("simple-page-master must have a region of class " + RegionBody.REGION_CLASS); - } - if (getRegion(RegionBefore.REGION_CLASS) != null) { - RegionArea before = - getRegion(RegionBefore.REGION_CLASS).makeRegionArea(contentRectangleXPosition, + if (before != null) + this.pageMaster.addBefore(before.makeRegionArea(contentRectangleXPosition, contentRectangleYPosition, contentRectangleWidth, - contentRectangleHeight); - this.pageMaster.addBefore(before); - beforePrecedence = - ((RegionBefore)getRegion(RegionBefore.REGION_CLASS)).getPrecedence(); - beforeHeight = before.getHeight(); - } else { - beforePrecedence = false; - } + contentRectangleHeight, startExtent, endExtent)); - if (getRegion(RegionAfter.REGION_CLASS) != null) { - RegionArea after = - getRegion(RegionAfter.REGION_CLASS).makeRegionArea(contentRectangleXPosition, + if (after != null) + this.pageMaster.addAfter(after.makeRegionArea(contentRectangleXPosition, contentRectangleYPosition, contentRectangleWidth, - contentRectangleHeight); - this.pageMaster.addAfter(after); - afterPrecedence = - ((RegionAfter)getRegion(RegionAfter.REGION_CLASS)).getPrecedence(); - afterHeight = after.getHeight(); - } else { - afterPrecedence = false; - } + contentRectangleHeight, startExtent, endExtent)); - if (getRegion(RegionStart.REGION_CLASS) != null) { - RegionArea start = - ((RegionStart)getRegion(RegionStart.REGION_CLASS)).makeRegionArea(contentRectangleXPosition, + if (start != null) + this.pageMaster.addStart(start.makeRegionArea(contentRectangleXPosition, contentRectangleYPosition, contentRectangleWidth, contentRectangleHeight, beforePrecedence, - afterPrecedence, beforeHeight, afterHeight); - this.pageMaster.addStart(start); - } + afterPrecedence, beforeExtent, afterExtent)); - if (getRegion(RegionEnd.REGION_CLASS) != null) { - RegionArea end = - ((RegionEnd)getRegion(RegionEnd.REGION_CLASS)).makeRegionArea(contentRectangleXPosition, + if (end != null) + this.pageMaster.addEnd(end.makeRegionArea(contentRectangleXPosition, contentRectangleYPosition, contentRectangleWidth, contentRectangleHeight, beforePrecedence, - afterPrecedence, beforeHeight, afterHeight); - this.pageMaster.addEnd(end); - } + afterPrecedence, beforeExtent, afterExtent)); } public PageMaster getPageMaster() { diff --git a/src/org/apache/fop/layout/AreaContainer.java b/src/org/apache/fop/layout/AreaContainer.java index 53da72fda..ce0d8a5c6 100644 --- a/src/org/apache/fop/layout/AreaContainer.java +++ b/src/org/apache/fop/layout/AreaContainer.java @@ -20,6 +20,7 @@ public class AreaContainer extends Area { private int xPosition; // should be able to take value 'left' and 'right' too private int yPosition; // should be able to take value 'top' and 'bottom' too private int position; + private boolean isRegionArea = false; // use this for identifying the general usage of the area, // like 'main-reference-area' or 'region-before' @@ -34,8 +35,19 @@ public class AreaContainer extends Area { // setIsReferenceArea(true); // Should always be true! } + public AreaContainer(FontState fontState, int xPosition, int yPosition, + int allocationWidth, int maxHeight, int position, + boolean isRegionArea) { + this(fontState, xPosition, yPosition, allocationWidth, maxHeight, + position); + this.isRegionArea = isRegionArea; + } + public void render(Renderer renderer) { - renderer.renderAreaContainer(this); + if (isRegionArea) + renderer.renderRegionAreaContainer(this); + else + renderer.renderAreaContainer(this); } public int getPosition() { diff --git a/src/org/apache/fop/layout/RegionArea.java b/src/org/apache/fop/layout/RegionArea.java index 23bd824fa..46c23ab9c 100644 --- a/src/org/apache/fop/layout/RegionArea.java +++ b/src/org/apache/fop/layout/RegionArea.java @@ -29,7 +29,7 @@ public class RegionArea { public AreaContainer makeAreaContainer() { AreaContainer area = new AreaContainer(null, xPosition, yPosition, width, height, - Position.ABSOLUTE); + Position.ABSOLUTE, true); area.setBackground(getBackground()); return area; } @@ -46,4 +46,8 @@ public class RegionArea { return height; } + public int getWidth() { + return width; + } + } diff --git a/src/org/apache/fop/render/AbstractRenderer.java b/src/org/apache/fop/render/AbstractRenderer.java index 5d5a45c8e..519e9e866 100644 --- a/src/org/apache/fop/render/AbstractRenderer.java +++ b/src/org/apache/fop/render/AbstractRenderer.java @@ -337,6 +337,45 @@ public abstract class AbstractRenderer implements Renderer { } + /** + * render region area container + * + * @param area the region area container to render + */ + public void renderRegionAreaContainer(AreaContainer area) { + int saveY = this.currentYPosition; + int saveX = this.currentAreaContainerXPosition; + + if (area.getPosition() == Position.ABSOLUTE) { + // Y position is computed assuming positive Y axis, adjust for negative postscript one + this.currentYPosition = area.getYPosition(); + this.currentAreaContainerXPosition = area.getXPosition(); + } else if (area.getPosition() == Position.RELATIVE) { + this.currentYPosition -= area.getYPosition(); + this.currentAreaContainerXPosition += area.getXPosition(); + } + + this.currentXPosition = this.currentAreaContainerXPosition; + int rx = this.currentAreaContainerXPosition; + int ry = this.currentYPosition; + int w = area.getAllocationWidth(); + int h = area.getMaxHeight(); + + doBackground(area, rx, ry, w, h); + + Enumeration e = area.getChildren().elements(); + while (e.hasMoreElements()) { + Box b = (Box)e.nextElement(); + b.render(this); // span areas + } + + if (area.getPosition() != Position.STATIC) { + this.currentYPosition = saveY; + this.currentAreaContainerXPosition = saveX; + } else + this.currentYPosition -= area.getHeight(); + } + /** * render area container * @@ -440,4 +479,21 @@ public abstract class AbstractRenderer implements Renderer { this.currentYPosition = ry - h; this.currentXPosition = rx; } + + /** + * render region areas + * + * @param page the page whose regions to render + */ + public void renderRegions(Page page) { + page.getBody().render(this); + if (page.getBefore() != null) + page.getBefore().render(this); + if (page.getAfter() != null) + page.getAfter().render(this); + if (page.getStart() != null) + page.getStart().render(this); + if (page.getEnd() != null) + page.getEnd().render(this); + } } diff --git a/src/org/apache/fop/render/Renderer.java b/src/org/apache/fop/render/Renderer.java index cba4956a3..b12fa7bc6 100644 --- a/src/org/apache/fop/render/Renderer.java +++ b/src/org/apache/fop/render/Renderer.java @@ -65,6 +65,11 @@ public interface Renderer { */ public void renderBodyAreaContainer(BodyAreaContainer area); + /** + * render the given region area container + */ + public void renderRegionAreaContainer(AreaContainer area); + /** * render the given span area */ diff --git a/src/org/apache/fop/render/awt/AWTRenderer.java b/src/org/apache/fop/render/awt/AWTRenderer.java index 4b8716af7..b88ba2965 100644 --- a/src/org/apache/fop/render/awt/AWTRenderer.java +++ b/src/org/apache/fop/render/awt/AWTRenderer.java @@ -380,26 +380,11 @@ public class AWTRenderer extends AbstractRenderer implements Printable, Pageable } public void renderPage(Page page) { - BodyAreaContainer body; - AreaContainer before, after; - - body = page.getBody(); - before = page.getBefore(); - after = page.getAfter(); this.currentFontName = ""; this.currentFontSize = 0; - renderBodyAreaContainer(body); - - if (before != null) { - renderAreaContainer(before); - } - - if (after != null) { - renderAreaContainer(after); - } - + renderRegions(page); // SG: Wollen wir Links abbilden? /* * if (page.hasLinks()) { diff --git a/src/org/apache/fop/render/mif/MIFRenderer.java b/src/org/apache/fop/render/mif/MIFRenderer.java index 0b5d89596..fc4dcda98 100644 --- a/src/org/apache/fop/render/mif/MIFRenderer.java +++ b/src/org/apache/fop/render/mif/MIFRenderer.java @@ -361,7 +361,7 @@ public class MIFRenderer extends AbstractRenderer { this.mifDoc.createPage(); - renderBodyAreaContainer(body); + body.render(this); // If the area is an instance of anything other than body, it goes into the @@ -371,13 +371,13 @@ public class MIFRenderer extends AbstractRenderer { if (before != null) { this.mifDoc.createTextRect(1); // Create a rect with one col - renderAreaContainer(before); + before.render(this); } if (after != null) { this.mifDoc.createTextRect(1); // Create a rect with one col - renderAreaContainer(after); + after.render(this); } } diff --git a/src/org/apache/fop/render/pcl/PCLRenderer.java b/src/org/apache/fop/render/pcl/PCLRenderer.java index db0f7211c..fc395ab24 100755 --- a/src/org/apache/fop/render/pcl/PCLRenderer.java +++ b/src/org/apache/fop/render/pcl/PCLRenderer.java @@ -676,8 +676,6 @@ public class PCLRenderer extends PrintRenderer { if (debug) System.out.println("PCLRenderer.renderPage() page.Height() = " + page.getHeight()); - BodyAreaContainer body; - AreaContainer before, after, start, end; if (paperheight > 0 && divisions == -1) divisions = paperheight / (page.getHeight() / 100); @@ -710,28 +708,10 @@ public class PCLRenderer extends PrintRenderer { currentStream.add("\033&k" + (leftmargin / 6f) + "H\033&a1L\033&k12H"); - body = page.getBody(); - before = page.getBefore(); - after = page.getAfter(); - start = page.getStart(); - end = page.getEnd(); - this.currentFontName = ""; this.currentFontSize = 0; - renderBodyAreaContainer(body); - - if (before != null) - renderAreaContainer(before); - - if (after != null) - renderAreaContainer(after); - - if (start != null) - renderAreaContainer(start); - - if (end != null) - renderAreaContainer(end); + renderRegions(page); // End page. if (++curdiv == divisions || divisions == -1) { diff --git a/src/org/apache/fop/render/pdf/PDFRenderer.java b/src/org/apache/fop/render/pdf/PDFRenderer.java index cb1274736..764cae951 100644 --- a/src/org/apache/fop/render/pdf/PDFRenderer.java +++ b/src/org/apache/fop/render/pdf/PDFRenderer.java @@ -828,41 +828,15 @@ public class PDFRenderer extends PrintRenderer { * @param page page to render */ public void renderPage(Page page) { - BodyAreaContainer body; - AreaContainer before; - AreaContainer after; - AreaContainer start; - AreaContainer end; - currentStream = this.pdfDoc.makeStream(); - body = page.getBody(); - before = page.getBefore(); - after = page.getAfter(); - start = page.getStart(); - end = page.getEnd(); this.currentFontName = ""; this.currentFontSize = 0; currentStream.add("BT\n"); - renderBodyAreaContainer(body); - - if (before != null) { - renderAreaContainer(before); - } - - if (after != null) { - renderAreaContainer(after); - } - - if (start != null) { - renderAreaContainer(start); - } + renderRegions(page); - if (end != null) { - renderAreaContainer(end); - } closeText(); float w = page.getWidth(); diff --git a/src/org/apache/fop/render/ps/PSRenderer.java b/src/org/apache/fop/render/ps/PSRenderer.java index 5a8ce25a3..041cf74d7 100644 --- a/src/org/apache/fop/render/ps/PSRenderer.java +++ b/src/org/apache/fop/render/ps/PSRenderer.java @@ -791,8 +791,6 @@ public class PSRenderer extends AbstractRenderer { this.pagecount++; this.idReferences = page.getIDReferences(); - BodyAreaContainer body; - AreaContainer before, after; write("%%Page: " + page.getNumber() + " " + page.getNumber()); write("%%PageBoundingBox: 0 0 " + Math.round(page.getWidth() / 1000f) + " " + @@ -802,16 +800,7 @@ public class PSRenderer extends AbstractRenderer { write("FOPFonts begin"); write("0.001 0.001 scale"); write("%%EndPageSetup"); - body = page.getBody(); - before = page.getBefore(); - after = page.getAfter(); - if (before != null) { - renderAreaContainer(before); - } - renderBodyAreaContainer(body); - if (after != null) { - renderAreaContainer(after); - } + renderRegions(page); write("showpage"); write("%%PageTrailer"); write("%%EndPage"); //This is non-standard, but used by Adobe. diff --git a/src/org/apache/fop/render/svg/SVGRenderer.java b/src/org/apache/fop/render/svg/SVGRenderer.java index a1bc6f241..7cb6254b4 100644 --- a/src/org/apache/fop/render/svg/SVGRenderer.java +++ b/src/org/apache/fop/render/svg/SVGRenderer.java @@ -261,25 +261,11 @@ public class SVGRenderer extends AbstractRenderer { } public void renderPage(Page page) { - BodyAreaContainer body; - AreaContainer before, after; - - body = page.getBody(); - before = page.getBefore(); - after = page.getAfter(); this.currentFontName = ""; this.currentFontSize = 0; - renderBodyAreaContainer(body); - - if (before != null) { - renderAreaContainer(before); - } - - if (after != null) { - renderAreaContainer(after); - } + renderRegions(page); } protected void doFrame(org.apache.fop.layout.Area area) { diff --git a/src/org/apache/fop/render/txt/TXTRenderer.java b/src/org/apache/fop/render/txt/TXTRenderer.java index 1b7740419..b954cb1d1 100755 --- a/src/org/apache/fop/render/txt/TXTRenderer.java +++ b/src/org/apache/fop/render/txt/TXTRenderer.java @@ -1606,8 +1606,6 @@ public class TXTRenderer extends PrintRenderer { if (debug) System.out.println("TXTRenderer.renderPage() page.getHeight() = " + page.getHeight()); - BodyAreaContainer body; - AreaContainer before, after, start, end; maxX = (int)(textCPI * page.getWidth() / 72000 + 1); maxY = (int)(textLPI * page.getHeight() / 72000 + 1); @@ -1627,29 +1625,11 @@ public class TXTRenderer extends PrintRenderer { + " yFactor=" + yFactor + " paperHeight=" + pageHeight); - body = page.getBody(); - before = page.getBefore(); - after = page.getAfter(); - start = page.getStart(); - end = page.getEnd(); - this.currentFontName = ""; this.currentFontSize = 0; // currentStream.add("BT\n"); - renderBodyAreaContainer(body); - - if (before != null) - renderAreaContainer(before); - - if (after != null) - renderAreaContainer(after); - - if (start != null) - renderAreaContainer(start); - - if (end != null) - renderAreaContainer(end); + renderRegions(page); // Write out the buffers. for (int row = 0; row <= maxY; row++) { diff --git a/src/org/apache/fop/render/xml/XMLRenderer.java b/src/org/apache/fop/render/xml/XMLRenderer.java index 7ac59a79f..c579a545f 100644 --- a/src/org/apache/fop/render/xml/XMLRenderer.java +++ b/src/org/apache/fop/render/xml/XMLRenderer.java @@ -226,6 +226,15 @@ public class XMLRenderer implements Renderer { writeEndTag(""); } + /** + * render a region area container to XML + * + * @param area the region area container to render + */ + public void renderRegionAreaContainer(AreaContainer area) { + renderAreaContainer(area); + } + /** * render a span area to XML * @@ -434,18 +443,21 @@ public class XMLRenderer implements Renderer { */ public void renderPage(Page page) { BodyAreaContainer body; - AreaContainer before, after; + AreaContainer before, after, start, end; writeStartTag(""); body = page.getBody(); before = page.getBefore(); after = page.getAfter(); - if (before != null) { - renderAreaContainer(before); - } - renderBodyAreaContainer(body); - if (after != null) { - renderAreaContainer(after); - } + start = page.getStart(); + end = page.getEnd(); + if (before != null) + before.render(this); + if (after != null) + after.render(this); + if (start != null) + start.render(this); + if (end != null) + end.render(this); writeEndTag(""); } -- 2.39.5