From 20849fb6fb56e3bc008725ab4dd39f54e1fa4cca Mon Sep 17 00:00:00 2001 From: Karen Lease Date: Fri, 9 Nov 2001 22:16:26 +0000 Subject: [PATCH] Rename Region to RegionReference in package area git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194548 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/fop/render/AbstractRenderer.java | 14 +++++----- .../apache/fop/render/xml/XMLRenderer.java | 12 ++++---- src/org/apache/fop/tools/AreaTreeBuilder.java | 28 +++++++++---------- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/org/apache/fop/render/AbstractRenderer.java b/src/org/apache/fop/render/AbstractRenderer.java index d2bebb77c..dbe041341 100644 --- a/src/org/apache/fop/render/AbstractRenderer.java +++ b/src/org/apache/fop/render/AbstractRenderer.java @@ -95,15 +95,15 @@ public abstract class AbstractRenderer implements Renderer { protected void renderPageAreas(Page page) { RegionViewport viewport; - viewport = page.getRegion(Region.BEFORE); + viewport = page.getRegion(RegionReference.BEFORE); renderRegionViewport(viewport); - viewport = page.getRegion(Region.START); + viewport = page.getRegion(RegionReference.START); renderRegionViewport(viewport); - viewport = page.getRegion(Region.BODY); + viewport = page.getRegion(RegionReference.BODY); renderRegionViewport(viewport); - viewport = page.getRegion(Region.END); + viewport = page.getRegion(RegionReference.END); renderRegionViewport(viewport); - viewport = page.getRegion(Region.AFTER); + viewport = page.getRegion(RegionReference.AFTER); renderRegionViewport(viewport); } @@ -117,7 +117,7 @@ public abstract class AbstractRenderer implements Renderer { currentIPPosition = (int) view.getX(); currentBlockIPPosition = currentIPPosition; - Region region = port.getRegion(); + RegionReference region = port.getRegion(); if (region.getRegionClass() == Region.BODY) { renderBodyRegion((BodyRegion) region); } else { @@ -126,7 +126,7 @@ public abstract class AbstractRenderer implements Renderer { } } - protected void renderRegion(Region region) { + protected void renderRegion(RegionReference region) { List blocks = region.getBlocks(); renderBlocks(blocks); diff --git a/src/org/apache/fop/render/xml/XMLRenderer.java b/src/org/apache/fop/render/xml/XMLRenderer.java index 1f7976cb4..206fcf67a 100644 --- a/src/org/apache/fop/render/xml/XMLRenderer.java +++ b/src/org/apache/fop/render/xml/XMLRenderer.java @@ -212,24 +212,24 @@ public class XMLRenderer extends AbstractRenderer { if (port != null) { writeStartTag(""); - Region region = port.getRegion(); - if (region.getRegionClass() == Region.BEFORE) { + RegionReference region = port.getRegion(); + if (region.getRegionClass() == RegionReference.BEFORE) { writeStartTag(""); renderRegion(region); writeEndTag(""); - } else if (region.getRegionClass() == Region.START) { + } else if (region.getRegionClass() == RegionReference.START) { writeStartTag(""); renderRegion(region); writeEndTag(""); - } else if (region.getRegionClass() == Region.BODY) { + } else if (region.getRegionClass() == RegionReference.BODY) { writeStartTag(""); renderBodyRegion((BodyRegion) region); writeEndTag(""); - } else if (region.getRegionClass() == Region.END) { + } else if (region.getRegionClass() == RegionReference.END) { writeStartTag(""); renderRegion(region); writeEndTag(""); - } else if (region.getRegionClass() == Region.AFTER) { + } else if (region.getRegionClass() == RegionReference.AFTER) { writeStartTag(""); renderRegion(region); writeEndTag(""); diff --git a/src/org/apache/fop/tools/AreaTreeBuilder.java b/src/org/apache/fop/tools/AreaTreeBuilder.java index 63fac5c91..dcf007b48 100644 --- a/src/org/apache/fop/tools/AreaTreeBuilder.java +++ b/src/org/apache/fop/tools/AreaTreeBuilder.java @@ -302,29 +302,29 @@ class TreeLoader { for (int i = 0; i < childs.getLength(); i++) { Node obj = childs.item(i); if (obj.getNodeName().equals("regionBefore")) { - reg.setRegion(readRegion((Element) obj, Region.BEFORE)); - page.setRegion(Region.BEFORE, reg); + reg.setRegion(readRegion((Element) obj, RegionReference.BEFORE)); + page.setRegion(RegionReference.BEFORE, reg); } else if (obj.getNodeName().equals("regionStart")) { - reg.setRegion(readRegion((Element) obj, Region.START)); - page.setRegion(Region.START, reg); + reg.setRegion(readRegion((Element) obj, RegionReference.START)); + page.setRegion(RegionReference.START, reg); } else if (obj.getNodeName().equals("regionBody")) { - reg.setRegion(readRegion((Element) obj, Region.BODY)); - page.setRegion(Region.BODY, reg); + reg.setRegion(readRegion((Element) obj, RegionReference.BODY)); + page.setRegion(RegionReference.BODY, reg); } else if (obj.getNodeName().equals("regionEnd")) { - reg.setRegion(readRegion((Element) obj, Region.END)); - page.setRegion(Region.END, reg); + reg.setRegion(readRegion((Element) obj, RegionReference.END)); + page.setRegion(RegionReference.END, reg); } else if (obj.getNodeName().equals("regionAfter")) { - reg.setRegion(readRegion((Element) obj, Region.AFTER)); - page.setRegion(Region.AFTER, reg); + reg.setRegion(readRegion((Element) obj, RegionReference.AFTER)); + page.setRegion(RegionReference.AFTER, reg); } } return reg; } - public Region readRegion(Element root, int type) { - Region reg; - if (type == Region.BODY) { + public RegionReference readRegion(Element root, int type) { + RegionReference reg; + if (type == RegionReference.BODY) { BodyRegion br = new BodyRegion(); NodeList childs = root.getChildNodes(); for (int i = 0; i < childs.getLength(); i++) { @@ -342,7 +342,7 @@ class TreeLoader { } reg = br; } else { - reg = new Region(type); + reg = new RegionReference(type); List blocks = getBlocks(root); for (int i = 0; i < blocks.size(); i++) { Block obj = (Block) blocks.get(i); -- 2.39.5