diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/org/apache/fop/render/AbstractRenderer.java | 14 | ||||
-rw-r--r-- | src/org/apache/fop/render/xml/XMLRenderer.java | 12 | ||||
-rw-r--r-- | 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("<regionViewport rect=\"" + createString(port.getViewArea()) + "\">"); - Region region = port.getRegion(); - if (region.getRegionClass() == Region.BEFORE) { + RegionReference region = port.getRegion(); + if (region.getRegionClass() == RegionReference.BEFORE) { writeStartTag("<regionBefore>"); renderRegion(region); writeEndTag("</regionBefore>"); - } else if (region.getRegionClass() == Region.START) { + } else if (region.getRegionClass() == RegionReference.START) { writeStartTag("<regionStart>"); renderRegion(region); writeEndTag("</regionStart>"); - } else if (region.getRegionClass() == Region.BODY) { + } else if (region.getRegionClass() == RegionReference.BODY) { writeStartTag("<regionBody>"); renderBodyRegion((BodyRegion) region); writeEndTag("</regionBody>"); - } else if (region.getRegionClass() == Region.END) { + } else if (region.getRegionClass() == RegionReference.END) { writeStartTag("<regionEnd>"); renderRegion(region); writeEndTag("</regionEnd>"); - } else if (region.getRegionClass() == Region.AFTER) { + } else if (region.getRegionClass() == RegionReference.AFTER) { writeStartTag("<regionAfter>"); renderRegion(region); writeEndTag("</regionAfter>"); 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); |