aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org
diff options
context:
space:
mode:
authorGlen Mazza <gmazza@apache.org>2004-01-07 21:28:42 +0000
committerGlen Mazza <gmazza@apache.org>2004-01-07 21:28:42 +0000
commit10bdf16024a9d40e38fae0870e274768826497ce (patch)
treeed14c9e3a5534187d79eb3f1d6bc654b9db8a1f0 /src/java/org
parent6b78b19472cd4dcd67859c958b1e5f85bdc731c5 (diff)
downloadxmlgraphics-fop-10bdf16024a9d40e38fae0870e274768826497ce.tar.gz
xmlgraphics-fop-10bdf16024a9d40e38fae0870e274768826497ce.zip
Constants simplifications in LengthRange and Space.java.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197145 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r--src/java/org/apache/fop/datatypes/LengthRange.java13
-rw-r--r--src/java/org/apache/fop/datatypes/Space.java9
2 files changed, 10 insertions, 12 deletions
diff --git a/src/java/org/apache/fop/datatypes/LengthRange.java b/src/java/org/apache/fop/datatypes/LengthRange.java
index 139fc5326..52e224788 100644
--- a/src/java/org/apache/fop/datatypes/LengthRange.java
+++ b/src/java/org/apache/fop/datatypes/LengthRange.java
@@ -51,7 +51,6 @@
package org.apache.fop.datatypes;
import org.apache.fop.fo.Property;
-import org.apache.fop.fo.Constants;
/**
* A "progression-dimension" quantity.
@@ -74,11 +73,11 @@ public class LengthRange implements CompoundDatatype {
*/
public void setComponent(int cmpId, Property cmpnValue,
boolean bIsDefault) {
- if (cmpId == Constants.CP_MINIMUM) {
+ if (cmpId == CP_MINIMUM) {
setMinimum(cmpnValue, bIsDefault);
- } else if (cmpId == Constants.CP_OPTIMUM) {
+ } else if (cmpId == CP_OPTIMUM) {
setOptimum(cmpnValue, bIsDefault);
- } else if (cmpId == Constants.CP_MAXIMUM) {
+ } else if (cmpId == CP_MAXIMUM) {
setMaximum(cmpnValue, bIsDefault);
}
}
@@ -87,11 +86,11 @@ public class LengthRange implements CompoundDatatype {
* @see org.apache.fop.datatypes.CompoundDatatype#getComponent(int)
*/
public Property getComponent(int cmpId) {
- if (cmpId == Constants.CP_MINIMUM) {
+ if (cmpId == CP_MINIMUM) {
return getMinimum();
- } else if (cmpId == Constants.CP_OPTIMUM) {
+ } else if (cmpId == CP_OPTIMUM) {
return getOptimum();
- } else if (cmpId == Constants.CP_MAXIMUM) {
+ } else if (cmpId == CP_MAXIMUM) {
return getMaximum();
} else {
return null; // SHOULDN'T HAPPEN
diff --git a/src/java/org/apache/fop/datatypes/Space.java b/src/java/org/apache/fop/datatypes/Space.java
index c4879f7d4..b7421cafd 100644
--- a/src/java/org/apache/fop/datatypes/Space.java
+++ b/src/java/org/apache/fop/datatypes/Space.java
@@ -51,7 +51,6 @@
package org.apache.fop.datatypes;
import org.apache.fop.fo.Property;
-import org.apache.fop.fo.Constants;
/**
* a space quantity in XSL (space-before, space-after)
@@ -66,9 +65,9 @@ public class Space extends LengthRange {
*/
public void setComponent(int cmpId, Property cmpnValue,
boolean bIsDefault) {
- if (cmpId == Constants.CP_PRECEDENCE) {
+ if (cmpId == CP_PRECEDENCE) {
setPrecedence(cmpnValue, bIsDefault);
- } else if (cmpId == Constants.CP_CONDITIONALITY) {
+ } else if (cmpId == CP_CONDITIONALITY) {
setConditionality(cmpnValue, bIsDefault);
} else {
super.setComponent(cmpId, cmpnValue, bIsDefault);
@@ -79,9 +78,9 @@ public class Space extends LengthRange {
* @see org.apache.fop.datatypes.CompoundDatatype#getComponent(int)
*/
public Property getComponent(int cmpId) {
- if (cmpId == Constants.CP_PRECEDENCE) {
+ if (cmpId == CP_PRECEDENCE) {
return getPrecedence();
- } else if (cmpId == Constants.CP_CONDITIONALITY) {
+ } else if (cmpId == CP_CONDITIONALITY) {
return getConditionality();
} else {
return super.getComponent(cmpId);