aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo
diff options
context:
space:
mode:
authorGlen Mazza <gmazza@apache.org>2003-12-22 03:53:31 +0000
committerGlen Mazza <gmazza@apache.org>2003-12-22 03:53:31 +0000
commit65efc8ad67604e3fee2337a1066ac02299951817 (patch)
treecce064782472ce2c53507660876d84bfc8b3856a /src/java/org/apache/fop/fo
parent657644f5904c56555d5ffca15ff297343cfbbd61 (diff)
downloadxmlgraphics-fop-65efc8ad67604e3fee2337a1066ac02299951817.tar.gz
xmlgraphics-fop-65efc8ad67604e3fee2337a1066ac02299951817.zip
----------------------------------------------------------------------
More of conversion of strings to integers: Makers now being created via int constants in fo.properties.Constants class. Temporary string-int conversions currently in Property.java and PropertyList.java, which converts strings from callers into ints for subsequent use. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197047 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo')
-rw-r--r--src/java/org/apache/fop/fo/CharacterProperty.java4
-rw-r--r--src/java/org/apache/fop/fo/ColorTypeProperty.java4
-rw-r--r--src/java/org/apache/fop/fo/CondLengthProperty.java4
-rw-r--r--src/java/org/apache/fop/fo/EnumProperty.java4
-rw-r--r--src/java/org/apache/fop/fo/KeepProperty.java4
-rw-r--r--src/java/org/apache/fop/fo/LengthPairProperty.java4
-rw-r--r--src/java/org/apache/fop/fo/LengthProperty.java4
-rw-r--r--src/java/org/apache/fop/fo/LengthRangeProperty.java4
-rw-r--r--src/java/org/apache/fop/fo/ListProperty.java4
-rw-r--r--src/java/org/apache/fop/fo/NumberProperty.java4
-rw-r--r--src/java/org/apache/fop/fo/Property.java20
-rw-r--r--src/java/org/apache/fop/fo/SpaceProperty.java4
-rw-r--r--src/java/org/apache/fop/fo/StringProperty.java4
13 files changed, 35 insertions, 33 deletions
diff --git a/src/java/org/apache/fop/fo/CharacterProperty.java b/src/java/org/apache/fop/fo/CharacterProperty.java
index 102fd33f5..d2f670b06 100644
--- a/src/java/org/apache/fop/fo/CharacterProperty.java
+++ b/src/java/org/apache/fop/fo/CharacterProperty.java
@@ -63,8 +63,8 @@ public class CharacterProperty extends Property {
/**
* @param propName name of property for which a Maker should be created
*/
- public Maker(String propName) {
- super(propName);
+ public Maker(int propId) {
+ super(propId);
}
public Property make(PropertyList propertyList, String value,
diff --git a/src/java/org/apache/fop/fo/ColorTypeProperty.java b/src/java/org/apache/fop/fo/ColorTypeProperty.java
index 3eaa6fc29..4cfaeb6ab 100644
--- a/src/java/org/apache/fop/fo/ColorTypeProperty.java
+++ b/src/java/org/apache/fop/fo/ColorTypeProperty.java
@@ -65,8 +65,8 @@ public class ColorTypeProperty extends Property {
/**
* @param propName name of property for which a Maker should be created
*/
- public Maker(String propName) {
- super(propName);
+ public Maker(int propId) {
+ super(propId);
}
public Property convertProperty(Property p,
diff --git a/src/java/org/apache/fop/fo/CondLengthProperty.java b/src/java/org/apache/fop/fo/CondLengthProperty.java
index 85ebf4e85..5cfbe469a 100644
--- a/src/java/org/apache/fop/fo/CondLengthProperty.java
+++ b/src/java/org/apache/fop/fo/CondLengthProperty.java
@@ -66,8 +66,8 @@ public class CondLengthProperty extends Property {
/**
* @param name of property for which a Maker should be created
*/
- public Maker(String name) {
- super(name);
+ public Maker(int propId) {
+ super(propId);
}
}
diff --git a/src/java/org/apache/fop/fo/EnumProperty.java b/src/java/org/apache/fop/fo/EnumProperty.java
index b23c8ec5a..155f41dc0 100644
--- a/src/java/org/apache/fop/fo/EnumProperty.java
+++ b/src/java/org/apache/fop/fo/EnumProperty.java
@@ -65,8 +65,8 @@ public class EnumProperty extends Property {
/**
* @param propName name of property for which a Maker should be created
*/
- protected Maker(String propName) {
- super(propName);
+ protected Maker(int propId) {
+ super(propId);
}
/**
diff --git a/src/java/org/apache/fop/fo/KeepProperty.java b/src/java/org/apache/fop/fo/KeepProperty.java
index 9d5e43f77..bab7c321f 100644
--- a/src/java/org/apache/fop/fo/KeepProperty.java
+++ b/src/java/org/apache/fop/fo/KeepProperty.java
@@ -65,8 +65,8 @@ public class KeepProperty extends Property {
/**
* @param name name of property for which Maker should be created
*/
- protected Maker(String name) {
- super(name);
+ protected Maker(int propId) {
+ super(propId);
}
}
diff --git a/src/java/org/apache/fop/fo/LengthPairProperty.java b/src/java/org/apache/fop/fo/LengthPairProperty.java
index 3098813dc..415880e8e 100644
--- a/src/java/org/apache/fop/fo/LengthPairProperty.java
+++ b/src/java/org/apache/fop/fo/LengthPairProperty.java
@@ -65,8 +65,8 @@ public class LengthPairProperty extends Property {
/**
* @param name name of property for which this Maker should be created
*/
- protected Maker(String name) {
- super(name);
+ protected Maker(int propId) {
+ super(propId);
}
}
diff --git a/src/java/org/apache/fop/fo/LengthProperty.java b/src/java/org/apache/fop/fo/LengthProperty.java
index ec0f32ca6..09ba76a91 100644
--- a/src/java/org/apache/fop/fo/LengthProperty.java
+++ b/src/java/org/apache/fop/fo/LengthProperty.java
@@ -68,8 +68,8 @@ public class LengthProperty extends Property {
/**
* @param name name of property for which Maker should be created
*/
- public /* protected */ Maker(String name) {
- super(name);
+ public Maker(int propId) {
+ super(propId);
}
/**
diff --git a/src/java/org/apache/fop/fo/LengthRangeProperty.java b/src/java/org/apache/fop/fo/LengthRangeProperty.java
index 401040dd8..b2a647a6c 100644
--- a/src/java/org/apache/fop/fo/LengthRangeProperty.java
+++ b/src/java/org/apache/fop/fo/LengthRangeProperty.java
@@ -65,8 +65,8 @@ public class LengthRangeProperty extends Property {
/**
* @param name name of property for which to create Maker
*/
- protected Maker(String name) {
- super(name);
+ protected Maker(int propId) {
+ super(propId);
}
}
diff --git a/src/java/org/apache/fop/fo/ListProperty.java b/src/java/org/apache/fop/fo/ListProperty.java
index c7b2c48fd..33a6fcf91 100644
--- a/src/java/org/apache/fop/fo/ListProperty.java
+++ b/src/java/org/apache/fop/fo/ListProperty.java
@@ -65,8 +65,8 @@ public class ListProperty extends Property {
/**
* @param name name of property for which Maker should be created
*/
- public Maker(String name) {
- super(name);
+ public Maker(int propId) {
+ super(propId);
}
/**
diff --git a/src/java/org/apache/fop/fo/NumberProperty.java b/src/java/org/apache/fop/fo/NumberProperty.java
index 62d557896..6e046615c 100644
--- a/src/java/org/apache/fop/fo/NumberProperty.java
+++ b/src/java/org/apache/fop/fo/NumberProperty.java
@@ -67,8 +67,8 @@ public class NumberProperty extends Property {
* Constructor for NumberProperty.Maker
* @param propName the name of the property
*/
- public Maker(String propName) {
- super(propName);
+ public Maker(int propId) {
+ super(propId);
}
/**
diff --git a/src/java/org/apache/fop/fo/Property.java b/src/java/org/apache/fop/fo/Property.java
index 0884e9460..8f922efa6 100644
--- a/src/java/org/apache/fop/fo/Property.java
+++ b/src/java/org/apache/fop/fo/Property.java
@@ -61,6 +61,8 @@ import org.apache.fop.datatypes.Space;
import org.apache.fop.fo.expr.Numeric;
import org.apache.fop.fo.expr.PropertyParser;
import org.apache.fop.fo.expr.PropertyInfo;
+import org.apache.fop.fo.properties.Constants;
+import org.apache.fop.fo.properties.FOPropertyMapping;
import org.apache.fop.apps.FOPException;
import java.util.Vector;
@@ -75,22 +77,21 @@ public class Property {
* @author unascribed
*/
public static class Maker {
- private static final String UNKNOWN = "UNKNOWN";
- private String propName;
+ private int propId;
/**
* @return the name of the property for this Maker
*/
protected String getPropName() {
- return propName;
+ return FOPropertyMapping.getPropertyName(this.propId);
}
/**
* Construct an instance of a Property.Maker for the given property.
- * @param propName The name of the property to be made.
+ * @param propId The Constant ID of the property to be made.
*/
- protected Maker(String propName) {
- this.propName = propName;
+ protected Maker(int propId) {
+ this.propId = propId;
}
/**
@@ -98,7 +99,7 @@ public class Property {
* Note: the property name is set to "UNKNOWN".
*/
protected Maker() {
- this.propName = UNKNOWN;
+ this.propId = 0;
}
@@ -252,7 +253,8 @@ public class Property {
}
return pret;
} catch (org.apache.fop.fo.expr.PropertyException propEx) {
- throw new FOPException("Error in " + propName
+ String propName = FOPropertyMapping.getPropertyName(this.propId);
+ throw new FOPException("Error in " + propName
+ " property value '" + value + "': "
+ propEx);
}
@@ -416,7 +418,7 @@ public class Property {
if (inheritsSpecified()) {
// recalculate based on last specified value
// Climb up propertylist and find last spec'd value
- // NEED PROPNAME!!! get from Maker
+ String propName = FOPropertyMapping.getPropertyName(this.propId);
Property specProp =
propertyList.getNearestSpecified(propName);
if (specProp != null) {
diff --git a/src/java/org/apache/fop/fo/SpaceProperty.java b/src/java/org/apache/fop/fo/SpaceProperty.java
index fde4e6a8c..6439e5eb2 100644
--- a/src/java/org/apache/fop/fo/SpaceProperty.java
+++ b/src/java/org/apache/fop/fo/SpaceProperty.java
@@ -68,8 +68,8 @@ public class SpaceProperty extends Property {
/**
* @param name name of the property whose Maker is to be created
*/
- protected Maker(String name) {
- super(name);
+ protected Maker(int propId) {
+ super(propId);
}
}
diff --git a/src/java/org/apache/fop/fo/StringProperty.java b/src/java/org/apache/fop/fo/StringProperty.java
index 2986e7ca5..a2d93d070 100644
--- a/src/java/org/apache/fop/fo/StringProperty.java
+++ b/src/java/org/apache/fop/fo/StringProperty.java
@@ -64,8 +64,8 @@ public class StringProperty extends Property {
/**
* @param propName name of property for which to create a Maker
*/
- public Maker(String propName) {
- super(propName);
+ public Maker(int propId) {
+ super(propId);
}
/**