aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/properties
diff options
context:
space:
mode:
authorGlen Mazza <gmazza@apache.org>2004-11-24 21:07:31 +0000
committerGlen Mazza <gmazza@apache.org>2004-11-24 21:07:31 +0000
commit632222604a21482c3443b4a7d45589803c72fe20 (patch)
treee196b62b1883862881596d7b98811178943a6077 /src/java/org/apache/fop/fo/properties
parentfaa67e299ce5bf80b14094acbc26fb7f177c94aa (diff)
downloadxmlgraphics-fop-632222604a21482c3443b4a7d45589803c72fe20.tar.gz
xmlgraphics-fop-632222604a21482c3443b4a7d45589803c72fe20.zip
PR:
Obtained from: Submitted by: Reviewed by: 1.) Removed unneeded enumeration interfaces from fo.Constants. 2.) Appended EN_ to enumeration constants to make them better S&R'able throughout app. 3.) Added an EN_INHERIT enumeration constant (although not currently used in the system.) git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198175 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/properties')
-rw-r--r--src/java/org/apache/fop/fo/properties/BorderWidthPropertyMaker.java2
-rwxr-xr-xsrc/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java6
-rw-r--r--src/java/org/apache/fop/fo/properties/CondLengthProperty.java2
-rwxr-xr-xsrc/java/org/apache/fop/fo/properties/PositionShorthandParser.java30
-rwxr-xr-xsrc/java/org/apache/fop/fo/properties/SpacingPropertyMaker.java2
5 files changed, 21 insertions, 21 deletions
diff --git a/src/java/org/apache/fop/fo/properties/BorderWidthPropertyMaker.java b/src/java/org/apache/fop/fo/properties/BorderWidthPropertyMaker.java
index 84e5122fb..2dad68853 100644
--- a/src/java/org/apache/fop/fo/properties/BorderWidthPropertyMaker.java
+++ b/src/java/org/apache/fop/fo/properties/BorderWidthPropertyMaker.java
@@ -61,7 +61,7 @@ public class BorderWidthPropertyMaker extends LengthProperty.Maker {
// Calculate the values as described in 7.7.20.
Property style = propertyList.get(borderStyleId);
- if (style.getEnum() == Constants.NONE) {
+ if (style.getEnum() == Constants.EN_NONE) {
return new FixedLength(0);
}
return p;
diff --git a/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java b/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java
index ba5637a3b..a3564c7aa 100755
--- a/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java
+++ b/src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java
@@ -129,7 +129,7 @@ public class CommonBorderPaddingBackground implements Cloneable {
padding[side] = pList.get(paddingProp).getCondLength();
// If style = none, force width to 0, don't get Color (spec 7.7.20)
int style = pList.get(styleProp).getEnum();
- if (style != Constants.NONE) {
+ if (style != Constants.EN_NONE) {
borderInfo[side] = new BorderInfo(style,
pList.get(widthProp).getCondLength(),
pList.get(colorProp).getColorType());
@@ -170,7 +170,7 @@ public class CommonBorderPaddingBackground implements Cloneable {
public int getBorderWidth(int side, boolean bDiscard) {
if ((borderInfo[side] == null)
- || (borderInfo[side].mStyle == Constants.NONE)
+ || (borderInfo[side].mStyle == Constants.EN_NONE)
|| (bDiscard && borderInfo[side].mWidth.isDiscard())) {
return 0;
} else {
@@ -190,7 +190,7 @@ public class CommonBorderPaddingBackground implements Cloneable {
if (borderInfo[side] != null) {
return borderInfo[side].mStyle;
} else {
- return Constants.NONE;
+ return Constants.EN_NONE;
}
}
diff --git a/src/java/org/apache/fop/fo/properties/CondLengthProperty.java b/src/java/org/apache/fop/fo/properties/CondLengthProperty.java
index 9238996bb..b14f12df3 100644
--- a/src/java/org/apache/fop/fo/properties/CondLengthProperty.java
+++ b/src/java/org/apache/fop/fo/properties/CondLengthProperty.java
@@ -111,7 +111,7 @@ public class CondLengthProperty extends Property implements CompoundDatatype {
* @return true if the length can be discarded.
*/
public boolean isDiscard() {
- return this.conditionality.getEnum() == Constants.DISCARD;
+ return this.conditionality.getEnum() == Constants.EN_DISCARD;
}
/**
diff --git a/src/java/org/apache/fop/fo/properties/PositionShorthandParser.java b/src/java/org/apache/fop/fo/properties/PositionShorthandParser.java
index bc7f46999..04d85cd8f 100755
--- a/src/java/org/apache/fop/fo/properties/PositionShorthandParser.java
+++ b/src/java/org/apache/fop/fo/properties/PositionShorthandParser.java
@@ -33,25 +33,25 @@ public class PositionShorthandParser implements ShorthandParser {
int propVal = property.getEnum();
if (propId == Constants.PR_ABSOLUTE_POSITION) {
switch (propVal) {
- case Constants.STATIC:
- case Constants.RELATIVE:
- return new EnumProperty(Constants.AUTO, "AUTO");
- case Constants.ABSOLUTE:
- return new EnumProperty(Constants.ABSOLUTE, "ABSOLUTE");
- case Constants.FIXED:
- return new EnumProperty(Constants.FIXED, "FIXED");
+ case Constants.EN_STATIC:
+ case Constants.EN_RELATIVE:
+ return new EnumProperty(Constants.EN_AUTO, "AUTO");
+ case Constants.EN_ABSOLUTE:
+ return new EnumProperty(Constants.EN_ABSOLUTE, "ABSOLUTE");
+ case Constants.EN_FIXED:
+ return new EnumProperty(Constants.EN_FIXED, "FIXED");
}
}
if (propId == Constants.PR_RELATIVE_POSITION) {
switch (propVal) {
- case Constants.STATIC:
- return new EnumProperty(Constants.STATIC, "STATIC");
- case Constants.RELATIVE:
- return new EnumProperty(Constants.RELATIVE, "RELATIVE");
- case Constants.ABSOLUTE:
- return new EnumProperty(Constants.STATIC, "STATIC");
- case Constants.FIXED:
- return new EnumProperty(Constants.STATIC, "STATIC");
+ case Constants.EN_STATIC:
+ return new EnumProperty(Constants.EN_STATIC, "STATIC");
+ case Constants.EN_RELATIVE:
+ return new EnumProperty(Constants.EN_RELATIVE, "RELATIVE");
+ case Constants.EN_ABSOLUTE:
+ return new EnumProperty(Constants.EN_STATIC, "STATIC");
+ case Constants.EN_FIXED:
+ return new EnumProperty(Constants.EN_STATIC, "STATIC");
}
}
return null;
diff --git a/src/java/org/apache/fop/fo/properties/SpacingPropertyMaker.java b/src/java/org/apache/fop/fo/properties/SpacingPropertyMaker.java
index 53ddae093..f4f709a05 100755
--- a/src/java/org/apache/fop/fo/properties/SpacingPropertyMaker.java
+++ b/src/java/org/apache/fop/fo/properties/SpacingPropertyMaker.java
@@ -44,7 +44,7 @@ public class SpacingPropertyMaker extends SpaceProperty.Maker {
public Property convertProperty(Property p,
PropertyList propertyList,
FObj fo) throws PropertyException {
- if (p.getEnum() == Constants.NORMAL) {
+ if (p.getEnum() == Constants.EN_NORMAL) {
return p;
}
return super.convertProperty(p, propertyList, fo);