aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/pagination/RegionEnd.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/fo/pagination/RegionEnd.java')
-rw-r--r--src/java/org/apache/fop/fo/pagination/RegionEnd.java27
1 files changed, 6 insertions, 21 deletions
diff --git a/src/java/org/apache/fop/fo/pagination/RegionEnd.java b/src/java/org/apache/fop/fo/pagination/RegionEnd.java
index bfadeb48b..0940719bf 100644
--- a/src/java/org/apache/fop/fo/pagination/RegionEnd.java
+++ b/src/java/org/apache/fop/fo/pagination/RegionEnd.java
@@ -21,10 +21,6 @@ package org.apache.fop.fo.pagination;
// Java
import java.awt.Rectangle;
-// XML
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXParseException;
-
// FOP
import org.apache.fop.fo.FONode;
import org.apache.fop.datatypes.FODimension;
@@ -33,9 +29,6 @@ import org.apache.fop.datatypes.FODimension;
* The fo:region-end element.
*/
public class RegionEnd extends RegionSE {
-
- private int extent = 0;
-
/**
* @see org.apache.fop.fo.FONode#FONode(FONode)
*/
@@ -44,29 +37,21 @@ public class RegionEnd extends RegionSE {
}
/**
- * @see org.apache.fop.fo.FObj#addProperties
- */
- protected void addProperties(Attributes attlist) throws SAXParseException {
- super.addProperties(attlist);
- extent = getPropLength(PR_EXTENT);
- }
-
- /**
* @see org.apache.fop.fo.pagination.Region#getViewportRectangle(FODimension)
*/
public Rectangle getViewportRectangle (FODimension reldims) {
// Depends on extent, precedence and writing mode
Rectangle vpRect;
- if (this.wm == WritingMode.LR_TB || this.wm == WritingMode.RL_TB) {
+ if (this.getWritingMode() == WritingMode.LR_TB || this.getWritingMode() == WritingMode.RL_TB) {
// Rectangle: x , y (of top left point), width, height
- vpRect = new Rectangle(reldims.ipd - extent, 0,
- extent, reldims.bpd);
+ vpRect = new Rectangle(reldims.ipd - getExtent().getValue(), 0,
+ getExtent().getValue(), reldims.bpd);
} else {
// Rectangle: x , y (of top left point), width, height
- vpRect = new Rectangle(reldims.ipd - extent, 0,
- reldims.bpd, extent);
+ vpRect = new Rectangle(reldims.ipd - getExtent().getValue(), 0,
+ reldims.bpd, getExtent().getValue());
}
- adjustIPD(vpRect, this.wm);
+ adjustIPD(vpRect, this.getWritingMode());
return vpRect;
}