From: Peter Bernard West Date: Fri, 30 Apr 2004 00:38:32 +0000 (+0000) Subject: Changes for padding corresponding absolute properties X-Git-Tag: Defoe_export~209 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f6d927ebb7c107dd37d859db81b07c835e1e3ea8;p=xmlgraphics-fop.git Changes for padding corresponding absolute properties git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197545 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/fo/properties/PaddingBottom.java b/src/java/org/apache/fop/fo/properties/PaddingBottom.java index 1b728baf2..a52938c88 100644 --- a/src/java/org/apache/fop/fo/properties/PaddingBottom.java +++ b/src/java/org/apache/fop/fo/properties/PaddingBottom.java @@ -22,10 +22,11 @@ package org.apache.fop.fo.properties; import org.apache.fop.datatypes.Length; import org.apache.fop.datatypes.PropertyValue; +import org.apache.fop.fo.FONode; import org.apache.fop.fo.PropNames; import org.apache.fop.fo.expr.PropertyException; -public class PaddingBottom extends Property { +public class PaddingBottom extends PaddingCorrespondingAbsolute { public static final int dataTypes = PERCENTAGE | LENGTH | INHERIT; public int getDataTypes() { @@ -56,5 +57,11 @@ public class PaddingBottom extends Property { return inherited; } + public int getCorrespondingProperty(FONode foNode) + throws PropertyException { + return getCorrespondingPaddingProperty( + foNode, WritingMode.BOTTOM); + } + } diff --git a/src/java/org/apache/fop/fo/properties/PaddingLeft.java b/src/java/org/apache/fop/fo/properties/PaddingLeft.java index ded3dea13..1596aaab2 100644 --- a/src/java/org/apache/fop/fo/properties/PaddingLeft.java +++ b/src/java/org/apache/fop/fo/properties/PaddingLeft.java @@ -22,10 +22,11 @@ package org.apache.fop.fo.properties; import org.apache.fop.datatypes.Length; import org.apache.fop.datatypes.PropertyValue; +import org.apache.fop.fo.FONode; import org.apache.fop.fo.PropNames; import org.apache.fop.fo.expr.PropertyException; -public class PaddingLeft extends Property { +public class PaddingLeft extends PaddingCorrespondingAbsolute { public static final int dataTypes = PERCENTAGE | LENGTH | INHERIT; public int getDataTypes() { @@ -55,5 +56,11 @@ public class PaddingLeft extends Property { return inherited; } + public int getCorrespondingProperty(FONode foNode) + throws PropertyException { + return getCorrespondingPaddingProperty( + foNode, WritingMode.LEFT); + } + } diff --git a/src/java/org/apache/fop/fo/properties/PaddingRight.java b/src/java/org/apache/fop/fo/properties/PaddingRight.java index 1486b770a..c00ff8cb6 100644 --- a/src/java/org/apache/fop/fo/properties/PaddingRight.java +++ b/src/java/org/apache/fop/fo/properties/PaddingRight.java @@ -22,10 +22,11 @@ package org.apache.fop.fo.properties; import org.apache.fop.datatypes.Length; import org.apache.fop.datatypes.PropertyValue; +import org.apache.fop.fo.FONode; import org.apache.fop.fo.PropNames; import org.apache.fop.fo.expr.PropertyException; -public class PaddingRight extends Property { +public class PaddingRight extends PaddingCorrespondingAbsolute { public static final int dataTypes = PERCENTAGE | LENGTH | INHERIT; public int getDataTypes() { @@ -55,5 +56,11 @@ public class PaddingRight extends Property { return inherited; } + public int getCorrespondingProperty(FONode foNode) + throws PropertyException { + return getCorrespondingPaddingProperty( + foNode, WritingMode.RIGHT); + } + } diff --git a/src/java/org/apache/fop/fo/properties/PaddingTop.java b/src/java/org/apache/fop/fo/properties/PaddingTop.java index 65d50b789..c55fdc37a 100644 --- a/src/java/org/apache/fop/fo/properties/PaddingTop.java +++ b/src/java/org/apache/fop/fo/properties/PaddingTop.java @@ -22,10 +22,11 @@ package org.apache.fop.fo.properties; import org.apache.fop.datatypes.Length; import org.apache.fop.datatypes.PropertyValue; +import org.apache.fop.fo.FONode; import org.apache.fop.fo.PropNames; import org.apache.fop.fo.expr.PropertyException; -public class PaddingTop extends Property { +public class PaddingTop extends PaddingCorrespondingAbsolute { public static final int dataTypes = PERCENTAGE | LENGTH | INHERIT; public int getDataTypes() { @@ -55,5 +56,11 @@ public class PaddingTop extends Property { return inherited; } + public int getCorrespondingProperty(FONode foNode) + throws PropertyException { + return getCorrespondingPaddingProperty( + foNode, WritingMode.TOP); + } + }