aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/fo')
-rw-r--r--src/java/org/apache/fop/fo/BoxPropShorthandParser.java2
-rw-r--r--src/java/org/apache/fop/fo/FOPropertyMapping.java15
-rw-r--r--src/java/org/apache/fop/fo/FObj.java1
-rw-r--r--src/java/org/apache/fop/fo/GenericShorthandParser.java2
-rw-r--r--src/java/org/apache/fop/fo/PropertyList.java1
-rw-r--r--src/java/org/apache/fop/fo/PropertyManager.java1
-rw-r--r--src/java/org/apache/fop/fo/ShorthandParser.java2
-rw-r--r--src/java/org/apache/fop/fo/expr/AbsFunction.java2
-rw-r--r--src/java/org/apache/fop/fo/expr/BodyStartFunction.java2
-rw-r--r--src/java/org/apache/fop/fo/expr/CeilingFunction.java4
-rw-r--r--src/java/org/apache/fop/fo/expr/FloorFunction.java4
-rw-r--r--src/java/org/apache/fop/fo/expr/FopPropValFunction.java2
-rw-r--r--src/java/org/apache/fop/fo/expr/FromParentFunction.java2
-rw-r--r--src/java/org/apache/fop/fo/expr/FromTableColumnFunction.java2
-rw-r--r--src/java/org/apache/fop/fo/expr/Function.java2
-rw-r--r--src/java/org/apache/fop/fo/expr/InheritedPropFunction.java2
-rw-r--r--src/java/org/apache/fop/fo/expr/LabelEndFunction.java8
-rw-r--r--src/java/org/apache/fop/fo/expr/MaxFunction.java2
-rw-r--r--src/java/org/apache/fop/fo/expr/MinFunction.java2
-rw-r--r--src/java/org/apache/fop/fo/expr/NCnameProperty.java2
-rw-r--r--src/java/org/apache/fop/fo/expr/NearestSpecPropFunction.java2
-rw-r--r--src/java/org/apache/fop/fo/expr/NumericProperty.java16
-rw-r--r--src/java/org/apache/fop/fo/expr/PPColWidthFunction.java4
-rw-r--r--src/java/org/apache/fop/fo/expr/PropertyParser.java16
-rw-r--r--src/java/org/apache/fop/fo/expr/RGBColorFunction.java4
-rw-r--r--src/java/org/apache/fop/fo/expr/RoundFunction.java4
-rw-r--r--src/java/org/apache/fop/fo/flow/ExternalGraphic.java2
-rw-r--r--src/java/org/apache/fop/fo/flow/Leader.java2
-rw-r--r--src/java/org/apache/fop/fo/flow/Table.java2
-rw-r--r--src/java/org/apache/fop/fo/flow/TableColumn.java2
-rw-r--r--src/java/org/apache/fop/fo/flow/TableRow.java2
-rw-r--r--src/java/org/apache/fop/fo/pagination/RegionBody.java2
-rw-r--r--src/java/org/apache/fop/fo/pagination/Title.java6
-rw-r--r--src/java/org/apache/fop/fo/properties/AutoLength.java78
-rw-r--r--src/java/org/apache/fop/fo/properties/BorderWidthPropertyMaker.java2
-rw-r--r--src/java/org/apache/fop/fo/properties/CharacterProperty.java (renamed from src/java/org/apache/fop/fo/CharacterProperty.java)7
-rw-r--r--src/java/org/apache/fop/fo/properties/ColorTypeProperty.java (renamed from src/java/org/apache/fop/fo/ColorTypeProperty.java)7
-rw-r--r--src/java/org/apache/fop/fo/properties/CommonBorderAndPadding.java1
-rw-r--r--src/java/org/apache/fop/fo/properties/CompoundPropertyMaker.java2
-rw-r--r--src/java/org/apache/fop/fo/properties/CondLengthProperty.java (renamed from src/java/org/apache/fop/fo/CondLengthProperty.java)8
-rw-r--r--src/java/org/apache/fop/fo/properties/CorrespondingPropertyMaker.java1
-rw-r--r--src/java/org/apache/fop/fo/properties/DimensionPropertyMaker.java1
-rw-r--r--src/java/org/apache/fop/fo/properties/EnumProperty.java (renamed from src/java/org/apache/fop/fo/EnumProperty.java)7
-rw-r--r--src/java/org/apache/fop/fo/properties/FixedLength.java127
-rw-r--r--src/java/org/apache/fop/fo/properties/IndentPropertyMaker.java2
-rw-r--r--src/java/org/apache/fop/fo/properties/KeepProperty.java (renamed from src/java/org/apache/fop/fo/KeepProperty.java)9
-rw-r--r--src/java/org/apache/fop/fo/properties/LengthPairProperty.java (renamed from src/java/org/apache/fop/fo/LengthPairProperty.java)9
-rw-r--r--src/java/org/apache/fop/fo/properties/LengthProperty.java (renamed from src/java/org/apache/fop/fo/LengthProperty.java)8
-rw-r--r--src/java/org/apache/fop/fo/properties/LengthRangeProperty.java (renamed from src/java/org/apache/fop/fo/LengthRangeProperty.java)9
-rw-r--r--src/java/org/apache/fop/fo/properties/LineHeightPropertyMaker.java3
-rw-r--r--src/java/org/apache/fop/fo/properties/LinearCombinationLength.java99
-rw-r--r--src/java/org/apache/fop/fo/properties/ListProperty.java (renamed from src/java/org/apache/fop/fo/ListProperty.java)7
-rw-r--r--src/java/org/apache/fop/fo/properties/MixedLength.java150
-rw-r--r--src/java/org/apache/fop/fo/properties/NumberProperty.java (renamed from src/java/org/apache/fop/fo/NumberProperty.java)7
-rw-r--r--src/java/org/apache/fop/fo/properties/PercentLength.java140
-rw-r--r--src/java/org/apache/fop/fo/properties/Property.java (renamed from src/java/org/apache/fop/fo/Property.java)5
-rw-r--r--src/java/org/apache/fop/fo/properties/PropertyMaker.java2
-rw-r--r--src/java/org/apache/fop/fo/properties/SpaceProperty.java (renamed from src/java/org/apache/fop/fo/SpaceProperty.java)9
-rw-r--r--src/java/org/apache/fop/fo/properties/StringProperty.java (renamed from src/java/org/apache/fop/fo/StringProperty.java)7
-rw-r--r--src/java/org/apache/fop/fo/properties/TableColLength.java121
-rw-r--r--src/java/org/apache/fop/fo/properties/ToBeImplementedProperty.java91
61 files changed, 935 insertions, 108 deletions
diff --git a/src/java/org/apache/fop/fo/BoxPropShorthandParser.java b/src/java/org/apache/fop/fo/BoxPropShorthandParser.java
index 4a35cba64..51c8f0610 100644
--- a/src/java/org/apache/fop/fo/BoxPropShorthandParser.java
+++ b/src/java/org/apache/fop/fo/BoxPropShorthandParser.java
@@ -50,6 +50,8 @@
*/
package org.apache.fop.fo;
+import org.apache.fop.fo.properties.ListProperty;
+import org.apache.fop.fo.properties.Property;
import org.apache.fop.fo.properties.PropertyMaker;
/**
diff --git a/src/java/org/apache/fop/fo/FOPropertyMapping.java b/src/java/org/apache/fop/fo/FOPropertyMapping.java
index ddb892e6c..a24243527 100644
--- a/src/java/org/apache/fop/fo/FOPropertyMapping.java
+++ b/src/java/org/apache/fop/fo/FOPropertyMapping.java
@@ -54,13 +54,26 @@ import java.util.HashMap;
import java.util.Map;
import org.apache.fop.datatypes.LengthBase;
-import org.apache.fop.datatypes.ToBeImplementedProperty;
import org.apache.fop.fo.properties.BorderWidthPropertyMaker;
+import org.apache.fop.fo.properties.CharacterProperty;
+import org.apache.fop.fo.properties.ColorTypeProperty;
+import org.apache.fop.fo.properties.CondLengthProperty;
import org.apache.fop.fo.properties.CorrespondingPropertyMaker;
import org.apache.fop.fo.properties.DimensionPropertyMaker;
+import org.apache.fop.fo.properties.EnumProperty;
import org.apache.fop.fo.properties.IndentPropertyMaker;
+import org.apache.fop.fo.properties.KeepProperty;
+import org.apache.fop.fo.properties.LengthPairProperty;
+import org.apache.fop.fo.properties.LengthProperty;
+import org.apache.fop.fo.properties.LengthRangeProperty;
import org.apache.fop.fo.properties.LineHeightPropertyMaker;
+import org.apache.fop.fo.properties.ListProperty;
+import org.apache.fop.fo.properties.NumberProperty;
+import org.apache.fop.fo.properties.Property;
import org.apache.fop.fo.properties.PropertyMaker;
+import org.apache.fop.fo.properties.SpaceProperty;
+import org.apache.fop.fo.properties.StringProperty;
+import org.apache.fop.fo.properties.ToBeImplementedProperty;
/**
* This class creates and returns an array of Property.Maker instances
diff --git a/src/java/org/apache/fop/fo/FObj.java b/src/java/org/apache/fop/fo/FObj.java
index 8576e29b9..6d61dce3b 100644
--- a/src/java/org/apache/fop/fo/FObj.java
+++ b/src/java/org/apache/fop/fo/FObj.java
@@ -59,6 +59,7 @@ import java.util.Set;
import org.apache.fop.apps.FOPException;
import org.apache.fop.fo.flow.Marker;
+import org.apache.fop.fo.properties.Property;
import org.apache.fop.fo.properties.PropertyMaker;
import org.xml.sax.Attributes;
import org.xml.sax.Locator;
diff --git a/src/java/org/apache/fop/fo/GenericShorthandParser.java b/src/java/org/apache/fop/fo/GenericShorthandParser.java
index 8591c9832..ad6300795 100644
--- a/src/java/org/apache/fop/fo/GenericShorthandParser.java
+++ b/src/java/org/apache/fop/fo/GenericShorthandParser.java
@@ -52,6 +52,8 @@ package org.apache.fop.fo;
import java.util.Enumeration;
+import org.apache.fop.fo.properties.ListProperty;
+import org.apache.fop.fo.properties.Property;
import org.apache.fop.fo.properties.PropertyMaker;
public class GenericShorthandParser implements ShorthandParser {
diff --git a/src/java/org/apache/fop/fo/PropertyList.java b/src/java/org/apache/fop/fo/PropertyList.java
index 68c843da7..39f989e0a 100644
--- a/src/java/org/apache/fop/fo/PropertyList.java
+++ b/src/java/org/apache/fop/fo/PropertyList.java
@@ -56,6 +56,7 @@ import org.xml.sax.Attributes;
// FOP
import org.apache.fop.apps.FOPException;
+import org.apache.fop.fo.properties.Property;
import org.apache.fop.fo.properties.PropertyMaker;
/**
diff --git a/src/java/org/apache/fop/fo/PropertyManager.java b/src/java/org/apache/fop/fo/PropertyManager.java
index 467254442..4c25add9e 100644
--- a/src/java/org/apache/fop/fo/PropertyManager.java
+++ b/src/java/org/apache/fop/fo/PropertyManager.java
@@ -52,6 +52,7 @@ package org.apache.fop.fo;
// FOP
import org.apache.fop.fonts.Font;
+import org.apache.fop.fo.properties.Property;
import org.apache.fop.fo.properties.CommonBorderAndPadding;
import org.apache.fop.fo.properties.CommonMarginBlock;
import org.apache.fop.fo.properties.CommonMarginInline;
diff --git a/src/java/org/apache/fop/fo/ShorthandParser.java b/src/java/org/apache/fop/fo/ShorthandParser.java
index b690abe95..5d9f901ec 100644
--- a/src/java/org/apache/fop/fo/ShorthandParser.java
+++ b/src/java/org/apache/fop/fo/ShorthandParser.java
@@ -50,6 +50,8 @@
*/
package org.apache.fop.fo;
+import org.apache.fop.fo.properties.ListProperty;
+import org.apache.fop.fo.properties.Property;
import org.apache.fop.fo.properties.PropertyMaker;
/**
diff --git a/src/java/org/apache/fop/fo/expr/AbsFunction.java b/src/java/org/apache/fop/fo/expr/AbsFunction.java
index f29bb8c6c..a6494eb5b 100644
--- a/src/java/org/apache/fop/fo/expr/AbsFunction.java
+++ b/src/java/org/apache/fop/fo/expr/AbsFunction.java
@@ -50,7 +50,7 @@
*/
package org.apache.fop.fo.expr;
-import org.apache.fop.fo.Property;
+import org.apache.fop.fo.properties.Property;
/**
* Class modelling the abs Number Function. See Sec. 5.10.1 of the XSL-FO spec.
diff --git a/src/java/org/apache/fop/fo/expr/BodyStartFunction.java b/src/java/org/apache/fop/fo/expr/BodyStartFunction.java
index 69416d770..d5abfd064 100644
--- a/src/java/org/apache/fop/fo/expr/BodyStartFunction.java
+++ b/src/java/org/apache/fop/fo/expr/BodyStartFunction.java
@@ -51,9 +51,9 @@
package org.apache.fop.fo.expr;
import org.apache.fop.fo.Constants;
-import org.apache.fop.fo.Property;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.flow.ListItem;
+import org.apache.fop.fo.properties.Property;
/**
* Class corresponding to the body-start Property Value function. See Sec.
diff --git a/src/java/org/apache/fop/fo/expr/CeilingFunction.java b/src/java/org/apache/fop/fo/expr/CeilingFunction.java
index f43544e38..5ec166b8e 100644
--- a/src/java/org/apache/fop/fo/expr/CeilingFunction.java
+++ b/src/java/org/apache/fop/fo/expr/CeilingFunction.java
@@ -50,8 +50,8 @@
*/
package org.apache.fop.fo.expr;
-import org.apache.fop.fo.Property;
-import org.apache.fop.fo.NumberProperty;
+import org.apache.fop.fo.properties.NumberProperty;
+import org.apache.fop.fo.properties.Property;
class CeilingFunction extends FunctionBase {
diff --git a/src/java/org/apache/fop/fo/expr/FloorFunction.java b/src/java/org/apache/fop/fo/expr/FloorFunction.java
index 48913dd95..aafcc36e3 100644
--- a/src/java/org/apache/fop/fo/expr/FloorFunction.java
+++ b/src/java/org/apache/fop/fo/expr/FloorFunction.java
@@ -50,8 +50,8 @@
*/
package org.apache.fop.fo.expr;
-import org.apache.fop.fo.Property;
-import org.apache.fop.fo.NumberProperty;
+import org.apache.fop.fo.properties.NumberProperty;
+import org.apache.fop.fo.properties.Property;
class FloorFunction extends FunctionBase {
diff --git a/src/java/org/apache/fop/fo/expr/FopPropValFunction.java b/src/java/org/apache/fop/fo/expr/FopPropValFunction.java
index 2d2581587..2d65461df 100644
--- a/src/java/org/apache/fop/fo/expr/FopPropValFunction.java
+++ b/src/java/org/apache/fop/fo/expr/FopPropValFunction.java
@@ -50,8 +50,8 @@
*/
package org.apache.fop.fo.expr;
-import org.apache.fop.fo.Property;
import org.apache.fop.fo.FOPropertyMapping;
+import org.apache.fop.fo.properties.Property;
/**
diff --git a/src/java/org/apache/fop/fo/expr/FromParentFunction.java b/src/java/org/apache/fop/fo/expr/FromParentFunction.java
index c6bf0dd5f..654aa2ce8 100644
--- a/src/java/org/apache/fop/fo/expr/FromParentFunction.java
+++ b/src/java/org/apache/fop/fo/expr/FromParentFunction.java
@@ -50,8 +50,8 @@
*/
package org.apache.fop.fo.expr;
-import org.apache.fop.fo.Property;
import org.apache.fop.fo.FOPropertyMapping;
+import org.apache.fop.fo.properties.Property;
/**
diff --git a/src/java/org/apache/fop/fo/expr/FromTableColumnFunction.java b/src/java/org/apache/fop/fo/expr/FromTableColumnFunction.java
index e6241ff16..3a798660f 100644
--- a/src/java/org/apache/fop/fo/expr/FromTableColumnFunction.java
+++ b/src/java/org/apache/fop/fo/expr/FromTableColumnFunction.java
@@ -50,7 +50,7 @@
*/
package org.apache.fop.fo.expr;
-import org.apache.fop.fo.Property;
+import org.apache.fop.fo.properties.Property;
/**
* Class modelling the from-table-column Property Value function. See Sec.
diff --git a/src/java/org/apache/fop/fo/expr/Function.java b/src/java/org/apache/fop/fo/expr/Function.java
index 0910ec173..a66523d8b 100644
--- a/src/java/org/apache/fop/fo/expr/Function.java
+++ b/src/java/org/apache/fop/fo/expr/Function.java
@@ -50,7 +50,7 @@
*/
package org.apache.fop.fo.expr;
-import org.apache.fop.fo.Property;
+import org.apache.fop.fo.properties.Property;
import org.apache.fop.datatypes.PercentBase;
/**
diff --git a/src/java/org/apache/fop/fo/expr/InheritedPropFunction.java b/src/java/org/apache/fop/fo/expr/InheritedPropFunction.java
index 08c8d96d4..31ef3a763 100644
--- a/src/java/org/apache/fop/fo/expr/InheritedPropFunction.java
+++ b/src/java/org/apache/fop/fo/expr/InheritedPropFunction.java
@@ -50,8 +50,8 @@
*/
package org.apache.fop.fo.expr;
-import org.apache.fop.fo.Property;
import org.apache.fop.fo.FOPropertyMapping;
+import org.apache.fop.fo.properties.Property;
/**
* Class modelling the inherited-property-value Property Value function. See
diff --git a/src/java/org/apache/fop/fo/expr/LabelEndFunction.java b/src/java/org/apache/fop/fo/expr/LabelEndFunction.java
index e44b29951..7b2277511 100644
--- a/src/java/org/apache/fop/fo/expr/LabelEndFunction.java
+++ b/src/java/org/apache/fop/fo/expr/LabelEndFunction.java
@@ -51,13 +51,13 @@
package org.apache.fop.fo.expr;
import org.apache.fop.datatypes.LengthBase;
-import org.apache.fop.datatypes.LinearCombinationLength;
-import org.apache.fop.datatypes.PercentLength;
import org.apache.fop.fo.Constants;
-import org.apache.fop.fo.Property;
-import org.apache.fop.fo.LengthProperty;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.flow.ListItem;
+import org.apache.fop.fo.properties.LengthProperty;
+import org.apache.fop.fo.properties.LinearCombinationLength;
+import org.apache.fop.fo.properties.PercentLength;
+import org.apache.fop.fo.properties.Property;
/**
* Class modelling the label-end Property Value function. See Sec. 5.10.4 of the
diff --git a/src/java/org/apache/fop/fo/expr/MaxFunction.java b/src/java/org/apache/fop/fo/expr/MaxFunction.java
index 40c8a407a..1127bcc97 100644
--- a/src/java/org/apache/fop/fo/expr/MaxFunction.java
+++ b/src/java/org/apache/fop/fo/expr/MaxFunction.java
@@ -50,7 +50,7 @@
*/
package org.apache.fop.fo.expr;
-import org.apache.fop.fo.Property;
+import org.apache.fop.fo.properties.Property;
/**
* Class for managing the "max" Number Function. See Sec. 5.10.1 in the XSL-FO
diff --git a/src/java/org/apache/fop/fo/expr/MinFunction.java b/src/java/org/apache/fop/fo/expr/MinFunction.java
index cdb9f25a3..6ddaa0ba3 100644
--- a/src/java/org/apache/fop/fo/expr/MinFunction.java
+++ b/src/java/org/apache/fop/fo/expr/MinFunction.java
@@ -50,7 +50,7 @@
*/
package org.apache.fop.fo.expr;
-import org.apache.fop.fo.Property;
+import org.apache.fop.fo.properties.Property;
/**
* Class for managing the "min" Number Function. See Sec. 5.10.1 in the XSL-FO
diff --git a/src/java/org/apache/fop/fo/expr/NCnameProperty.java b/src/java/org/apache/fop/fo/expr/NCnameProperty.java
index 7fff73df2..7fd8801de 100644
--- a/src/java/org/apache/fop/fo/expr/NCnameProperty.java
+++ b/src/java/org/apache/fop/fo/expr/NCnameProperty.java
@@ -50,7 +50,7 @@
*/
package org.apache.fop.fo.expr;
-import org.apache.fop.fo.Property;
+import org.apache.fop.fo.properties.Property;
import org.apache.fop.datatypes.ColorType;
/**
diff --git a/src/java/org/apache/fop/fo/expr/NearestSpecPropFunction.java b/src/java/org/apache/fop/fo/expr/NearestSpecPropFunction.java
index 6ac4dc743..a52a4a0c4 100644
--- a/src/java/org/apache/fop/fo/expr/NearestSpecPropFunction.java
+++ b/src/java/org/apache/fop/fo/expr/NearestSpecPropFunction.java
@@ -50,8 +50,8 @@
*/
package org.apache.fop.fo.expr;
-import org.apache.fop.fo.Property;
import org.apache.fop.fo.FOPropertyMapping;
+import org.apache.fop.fo.properties.Property;
/**
* Class modelling the from-nearest-specified-value function. See Sec. 5.10.4
diff --git a/src/java/org/apache/fop/fo/expr/NumericProperty.java b/src/java/org/apache/fop/fo/expr/NumericProperty.java
index 3d9028cba..70de2fa44 100644
--- a/src/java/org/apache/fop/fo/expr/NumericProperty.java
+++ b/src/java/org/apache/fop/fo/expr/NumericProperty.java
@@ -53,14 +53,14 @@ package org.apache.fop.fo.expr;
import java.util.Vector;
import org.apache.fop.datatypes.PercentBase;
-import org.apache.fop.datatypes.FixedLength;
-import org.apache.fop.datatypes.TableColLength;
-import org.apache.fop.datatypes.PercentLength;
-import org.apache.fop.datatypes.MixedLength;
-
-import org.apache.fop.fo.ColorTypeProperty;
-import org.apache.fop.fo.LengthProperty;
-import org.apache.fop.fo.Property;
+
+import org.apache.fop.fo.properties.ColorTypeProperty;
+import org.apache.fop.fo.properties.FixedLength;
+import org.apache.fop.fo.properties.LengthProperty;
+import org.apache.fop.fo.properties.MixedLength;
+import org.apache.fop.fo.properties.PercentLength;
+import org.apache.fop.fo.properties.Property;
+import org.apache.fop.fo.properties.TableColLength;
public class NumericProperty extends Property {
// Bit fields
diff --git a/src/java/org/apache/fop/fo/expr/PPColWidthFunction.java b/src/java/org/apache/fop/fo/expr/PPColWidthFunction.java
index 4d2ce74fc..06edf8d41 100644
--- a/src/java/org/apache/fop/fo/expr/PPColWidthFunction.java
+++ b/src/java/org/apache/fop/fo/expr/PPColWidthFunction.java
@@ -51,8 +51,8 @@
package org.apache.fop.fo.expr;
-import org.apache.fop.fo.Property;
-import org.apache.fop.datatypes.TableColLength;
+import org.apache.fop.fo.properties.Property;
+import org.apache.fop.fo.properties.TableColLength;
/**
* Class modelling the proportional-column-width function. See Sec. 5.10.4 of
diff --git a/src/java/org/apache/fop/fo/expr/PropertyParser.java b/src/java/org/apache/fop/fo/expr/PropertyParser.java
index 4a2bcca09..a26630277 100644
--- a/src/java/org/apache/fop/fo/expr/PropertyParser.java
+++ b/src/java/org/apache/fop/fo/expr/PropertyParser.java
@@ -50,15 +50,15 @@
*/
package org.apache.fop.fo.expr;
-import org.apache.fop.datatypes.FixedLength;
import org.apache.fop.datatypes.PercentBase;
-import org.apache.fop.datatypes.PercentLength;
-import org.apache.fop.fo.Property;
-import org.apache.fop.fo.ColorTypeProperty;
-import org.apache.fop.fo.ListProperty;
-import org.apache.fop.fo.LengthProperty;
-import org.apache.fop.fo.NumberProperty;
-import org.apache.fop.fo.StringProperty;
+import org.apache.fop.fo.properties.ColorTypeProperty;
+import org.apache.fop.fo.properties.FixedLength;
+import org.apache.fop.fo.properties.LengthProperty;
+import org.apache.fop.fo.properties.ListProperty;
+import org.apache.fop.fo.properties.NumberProperty;
+import org.apache.fop.fo.properties.PercentLength;
+import org.apache.fop.fo.properties.Property;
+import org.apache.fop.fo.properties.StringProperty;
import java.util.HashMap;
diff --git a/src/java/org/apache/fop/fo/expr/RGBColorFunction.java b/src/java/org/apache/fop/fo/expr/RGBColorFunction.java
index 00b58a359..69d92c9c0 100644
--- a/src/java/org/apache/fop/fo/expr/RGBColorFunction.java
+++ b/src/java/org/apache/fop/fo/expr/RGBColorFunction.java
@@ -51,8 +51,8 @@
package org.apache.fop.fo.expr;
-import org.apache.fop.fo.Property;
-import org.apache.fop.fo.ColorTypeProperty;
+import org.apache.fop.fo.properties.ColorTypeProperty;
+import org.apache.fop.fo.properties.Property;
import org.apache.fop.datatypes.PercentBase;
class RGBColorFunction extends FunctionBase {
diff --git a/src/java/org/apache/fop/fo/expr/RoundFunction.java b/src/java/org/apache/fop/fo/expr/RoundFunction.java
index 1877c87f2..3980704d1 100644
--- a/src/java/org/apache/fop/fo/expr/RoundFunction.java
+++ b/src/java/org/apache/fop/fo/expr/RoundFunction.java
@@ -51,8 +51,8 @@
package org.apache.fop.fo.expr;
-import org.apache.fop.fo.Property;
-import org.apache.fop.fo.NumberProperty;
+import org.apache.fop.fo.properties.NumberProperty;
+import org.apache.fop.fo.properties.Property;
class RoundFunction extends FunctionBase {
public int nbArgs() {
diff --git a/src/java/org/apache/fop/fo/flow/ExternalGraphic.java b/src/java/org/apache/fop/fo/flow/ExternalGraphic.java
index 06141c983..3e51896be 100644
--- a/src/java/org/apache/fop/fo/flow/ExternalGraphic.java
+++ b/src/java/org/apache/fop/fo/flow/ExternalGraphic.java
@@ -58,7 +58,7 @@ import org.apache.fop.apps.FOPException;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
import org.apache.fop.fo.FOTreeVisitor;
-import org.apache.fop.fo.LengthProperty;
+import org.apache.fop.fo.properties.LengthProperty;
import org.apache.fop.image.ImageFactory;
import org.apache.fop.image.FopImage;
// Java
diff --git a/src/java/org/apache/fop/fo/flow/Leader.java b/src/java/org/apache/fop/fo/flow/Leader.java
index bcb745399..e7cb39d1e 100644
--- a/src/java/org/apache/fop/fo/flow/Leader.java
+++ b/src/java/org/apache/fop/fo/flow/Leader.java
@@ -52,7 +52,6 @@ package org.apache.fop.fo.flow;
import org.apache.fop.datatypes.ColorType;
import org.apache.fop.datatypes.Length;
-import org.apache.fop.datatypes.PercentLength;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FOTreeVisitor;
import org.apache.fop.fo.FObjMixed;
@@ -62,6 +61,7 @@ import org.apache.fop.fo.properties.CommonBackground;
import org.apache.fop.fo.properties.CommonBorderAndPadding;
import org.apache.fop.fo.properties.CommonMarginInline;
import org.apache.fop.fo.properties.CommonRelativePosition;
+import org.apache.fop.fo.properties.PercentLength;
import org.apache.fop.fonts.Font;
/**
diff --git a/src/java/org/apache/fop/fo/flow/Table.java b/src/java/org/apache/fop/fo/flow/Table.java
index ad531aa6f..1a621b39c 100644
--- a/src/java/org/apache/fop/fo/flow/Table.java
+++ b/src/java/org/apache/fop/fo/flow/Table.java
@@ -59,7 +59,6 @@ import org.xml.sax.Attributes;
// FOP
import org.apache.fop.apps.FOPException;
import org.apache.fop.datatypes.ColorType;
-import org.apache.fop.fo.LengthRangeProperty;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
import org.apache.fop.fo.FOTreeVisitor;
@@ -69,6 +68,7 @@ import org.apache.fop.fo.properties.CommonBackground;
import org.apache.fop.fo.properties.CommonBorderAndPadding;
import org.apache.fop.fo.properties.CommonMarginBlock;
import org.apache.fop.fo.properties.CommonRelativePosition;
+import org.apache.fop.fo.properties.LengthRangeProperty;
/**
* Class modelling the fo:table object. See Sec. 6.7.3 of the XSL-FO Standard.
diff --git a/src/java/org/apache/fop/fo/flow/TableColumn.java b/src/java/org/apache/fop/fo/flow/TableColumn.java
index 4d6eb7a78..76a960771 100644
--- a/src/java/org/apache/fop/fo/flow/TableColumn.java
+++ b/src/java/org/apache/fop/fo/flow/TableColumn.java
@@ -60,10 +60,10 @@ import org.apache.fop.datatypes.Length;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
import org.apache.fop.fo.FOTreeVisitor;
-import org.apache.fop.fo.Property;
import org.apache.fop.fo.properties.CommonBackground;
import org.apache.fop.fo.properties.CommonBorderAndPadding;
+import org.apache.fop.fo.properties.Property;
/**
* Class modelling the fo:table-column object. See Sec. 6.7.4 of the XSL-FO
diff --git a/src/java/org/apache/fop/fo/flow/TableRow.java b/src/java/org/apache/fop/fo/flow/TableRow.java
index 39bac72ed..a8806d8d9 100644
--- a/src/java/org/apache/fop/fo/flow/TableRow.java
+++ b/src/java/org/apache/fop/fo/flow/TableRow.java
@@ -59,7 +59,6 @@ import org.apache.fop.datatypes.ColorType;
import org.apache.fop.datatypes.KeepValue;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
-import org.apache.fop.fo.Property;
import org.apache.fop.fo.FOTreeVisitor;
import org.apache.fop.fo.Constants;
@@ -68,6 +67,7 @@ import org.apache.fop.fo.properties.CommonAural;
import org.apache.fop.fo.properties.CommonBackground;
import org.apache.fop.fo.properties.CommonBorderAndPadding;
import org.apache.fop.fo.properties.CommonRelativePosition;
+import org.apache.fop.fo.properties.Property;
/**
diff --git a/src/java/org/apache/fop/fo/pagination/RegionBody.java b/src/java/org/apache/fop/fo/pagination/RegionBody.java
index fd89cc670..1a55e7838 100644
--- a/src/java/org/apache/fop/fo/pagination/RegionBody.java
+++ b/src/java/org/apache/fop/fo/pagination/RegionBody.java
@@ -57,9 +57,9 @@ import org.apache.fop.datatypes.FODimension;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FOTreeVisitor;
import org.apache.fop.fo.FObj;
-import org.apache.fop.fo.Property;
import org.apache.fop.fo.PropertyList;
import org.apache.fop.fo.properties.CommonMarginBlock;
+import org.apache.fop.fo.properties.Property;
import org.apache.fop.fo.FOPropertyMapping;
/**
diff --git a/src/java/org/apache/fop/fo/pagination/Title.java b/src/java/org/apache/fop/fo/pagination/Title.java
index 3fbe8c67b..6036893fc 100644
--- a/src/java/org/apache/fop/fo/pagination/Title.java
+++ b/src/java/org/apache/fop/fo/pagination/Title.java
@@ -53,16 +53,16 @@ package org.apache.fop.fo.pagination;
// FOP
import org.apache.fop.datatypes.ColorType;
import org.apache.fop.datatypes.Length;
-import org.apache.fop.fo.EnumProperty;
import org.apache.fop.fo.FObjMixed;
import org.apache.fop.fo.FONode;
-import org.apache.fop.fo.LengthProperty;
-import org.apache.fop.fo.Property;
import org.apache.fop.fo.FOTreeVisitor;
import org.apache.fop.fo.properties.CommonAccessibility;
import org.apache.fop.fo.properties.CommonAural;
import org.apache.fop.fo.properties.CommonBackground;
import org.apache.fop.fo.properties.CommonBorderAndPadding;
+import org.apache.fop.fo.properties.EnumProperty;
+import org.apache.fop.fo.properties.LengthProperty;
+import org.apache.fop.fo.properties.Property;
import org.apache.fop.fonts.Font;
import org.apache.fop.fo.properties.CommonMarginInline;
diff --git a/src/java/org/apache/fop/fo/properties/AutoLength.java b/src/java/org/apache/fop/fo/properties/AutoLength.java
new file mode 100644
index 000000000..0730a289c
--- /dev/null
+++ b/src/java/org/apache/fop/fo/properties/AutoLength.java
@@ -0,0 +1,78 @@
+/*
+ * $Id$
+ * ============================================================================
+ * The Apache Software License, Version 1.1
+ * ============================================================================
+ *
+ * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modifica-
+ * tion, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if any, must
+ * include the following acknowledgment: "This product includes software
+ * developed by the Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself, if
+ * and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ * endorse or promote products derived from this software without prior
+ * written permission. For written permission, please contact
+ * apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache", nor may
+ * "Apache" appear in their name, without prior written permission of the
+ * Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ============================================================================
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+package org.apache.fop.fo.properties;
+
+
+/**
+ * A length quantity in XSL which is specified as "auto".
+ */
+public class AutoLength extends LengthProperty {
+
+ /**
+ * @see org.apache.fop.datatypes.Length#isAuto()
+ */
+ public boolean isAuto() {
+ return true;
+ }
+
+ // Should we do something intelligent here to set the actual size?
+ // Would need a reference object!
+ // protected void computeValue() {
+ // }
+
+ /**
+ * @see org.apache.fop.fo.Property#getString()
+ */
+ public String getString() {
+ return "auto";
+ }
+
+}
diff --git a/src/java/org/apache/fop/fo/properties/BorderWidthPropertyMaker.java b/src/java/org/apache/fop/fo/properties/BorderWidthPropertyMaker.java
index 637a62845..ff6849696 100644
--- a/src/java/org/apache/fop/fo/properties/BorderWidthPropertyMaker.java
+++ b/src/java/org/apache/fop/fo/properties/BorderWidthPropertyMaker.java
@@ -52,8 +52,6 @@ package org.apache.fop.fo.properties;
import org.apache.fop.apps.FOPException;
import org.apache.fop.fo.Constants;
-import org.apache.fop.fo.LengthProperty;
-import org.apache.fop.fo.Property;
import org.apache.fop.fo.PropertyList;
/**
diff --git a/src/java/org/apache/fop/fo/CharacterProperty.java b/src/java/org/apache/fop/fo/properties/CharacterProperty.java
index 4a95c8ad0..4931887b4 100644
--- a/src/java/org/apache/fop/fo/CharacterProperty.java
+++ b/src/java/org/apache/fop/fo/properties/CharacterProperty.java
@@ -1,5 +1,5 @@
/*
- * $Id: CharacterProperty.java,v 1.3 2003/03/05 21:48:02 jeremias Exp $
+ * $Id$
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
@@ -48,9 +48,10 @@
* James Tauber <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
*/
-package org.apache.fop.fo;
+package org.apache.fop.fo.properties;
-import org.apache.fop.fo.properties.PropertyMaker;
+import org.apache.fop.fo.FObj;
+import org.apache.fop.fo.PropertyList;
/**
* Superclass for properties that wrap a character value
diff --git a/src/java/org/apache/fop/fo/ColorTypeProperty.java b/src/java/org/apache/fop/fo/properties/ColorTypeProperty.java
index 125e1dbc4..f85154ef9 100644
--- a/src/java/org/apache/fop/fo/ColorTypeProperty.java
+++ b/src/java/org/apache/fop/fo/properties/ColorTypeProperty.java
@@ -1,5 +1,5 @@
/*
- * $Id: ColorTypeProperty.java,v 1.5 2003/03/05 21:48:02 jeremias Exp $
+ * $Id$
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
@@ -48,13 +48,14 @@
* James Tauber <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
*/
-package org.apache.fop.fo;
+package org.apache.fop.fo.properties;
import java.awt.Color;
import java.util.StringTokenizer;
import org.apache.fop.datatypes.ColorType;
-import org.apache.fop.fo.properties.PropertyMaker;
+import org.apache.fop.fo.FObj;
+import org.apache.fop.fo.PropertyList;
/**
* Superclass for properties that wrap ColorType values
diff --git a/src/java/org/apache/fop/fo/properties/CommonBorderAndPadding.java b/src/java/org/apache/fop/fo/properties/CommonBorderAndPadding.java
index aa72ad6de..80ff56d61 100644
--- a/src/java/org/apache/fop/fo/properties/CommonBorderAndPadding.java
+++ b/src/java/org/apache/fop/fo/properties/CommonBorderAndPadding.java
@@ -52,7 +52,6 @@ package org.apache.fop.fo.properties;
import org.apache.fop.datatypes.ColorType;
import org.apache.fop.fo.Constants;
-import org.apache.fop.fo.CondLengthProperty;
/**
* Stores all common border and padding properties.
diff --git a/src/java/org/apache/fop/fo/properties/CompoundPropertyMaker.java b/src/java/org/apache/fop/fo/properties/CompoundPropertyMaker.java
index 9a1168072..96cc148e7 100644
--- a/src/java/org/apache/fop/fo/properties/CompoundPropertyMaker.java
+++ b/src/java/org/apache/fop/fo/properties/CompoundPropertyMaker.java
@@ -53,9 +53,7 @@ package org.apache.fop.fo.properties;
import org.apache.fop.apps.FOPException;
import org.apache.fop.datatypes.CompoundDatatype;
import org.apache.fop.fo.Constants;
-import org.apache.fop.fo.EnumProperty;
import org.apache.fop.fo.FObj;
-import org.apache.fop.fo.Property;
import org.apache.fop.fo.PropertyList;
/**
diff --git a/src/java/org/apache/fop/fo/CondLengthProperty.java b/src/java/org/apache/fop/fo/properties/CondLengthProperty.java
index aa2260a41..6eca74439 100644
--- a/src/java/org/apache/fop/fo/CondLengthProperty.java
+++ b/src/java/org/apache/fop/fo/properties/CondLengthProperty.java
@@ -1,5 +1,5 @@
/*
- * $Id: CondLengthProperty.java,v 1.5 2003/03/05 21:48:01 jeremias Exp $
+ * $Id$
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
@@ -48,11 +48,13 @@
* James Tauber <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
*/
-package org.apache.fop.fo;
+package org.apache.fop.fo.properties;
import org.apache.fop.apps.FOPException;
import org.apache.fop.datatypes.CompoundDatatype;
-import org.apache.fop.fo.properties.CompoundPropertyMaker;
+import org.apache.fop.fo.Constants;
+import org.apache.fop.fo.FObj;
+import org.apache.fop.fo.PropertyList;
/**
* Superclass for properties that have conditional lengths
diff --git a/src/java/org/apache/fop/fo/properties/CorrespondingPropertyMaker.java b/src/java/org/apache/fop/fo/properties/CorrespondingPropertyMaker.java
index 568e3a599..6852b77ae 100644
--- a/src/java/org/apache/fop/fo/properties/CorrespondingPropertyMaker.java
+++ b/src/java/org/apache/fop/fo/properties/CorrespondingPropertyMaker.java
@@ -52,7 +52,6 @@ package org.apache.fop.fo.properties;
import org.apache.fop.apps.FOPException;
import org.apache.fop.fo.FObj;
-import org.apache.fop.fo.Property;
import org.apache.fop.fo.PropertyList;
/**
diff --git a/src/java/org/apache/fop/fo/properties/DimensionPropertyMaker.java b/src/java/org/apache/fop/fo/properties/DimensionPropertyMaker.java
index c1c324cde..50d03ea20 100644
--- a/src/java/org/apache/fop/fo/properties/DimensionPropertyMaker.java
+++ b/src/java/org/apache/fop/fo/properties/DimensionPropertyMaker.java
@@ -52,7 +52,6 @@ package org.apache.fop.fo.properties;
import org.apache.fop.apps.FOPException;
import org.apache.fop.fo.Constants;
-import org.apache.fop.fo.Property;
import org.apache.fop.fo.PropertyList;
/**
diff --git a/src/java/org/apache/fop/fo/EnumProperty.java b/src/java/org/apache/fop/fo/properties/EnumProperty.java
index 5d09de9c7..600cd8cb0 100644
--- a/src/java/org/apache/fop/fo/EnumProperty.java
+++ b/src/java/org/apache/fop/fo/properties/EnumProperty.java
@@ -1,5 +1,5 @@
/*
- * $Id: EnumProperty.java,v 1.8 2003/03/05 21:48:01 jeremias Exp $
+ * $Id$
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
@@ -48,10 +48,11 @@
* James Tauber <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
*/
-package org.apache.fop.fo;
+package org.apache.fop.fo.properties;
import org.apache.fop.apps.FOPException;
-import org.apache.fop.fo.properties.PropertyMaker;
+import org.apache.fop.fo.FObj;
+import org.apache.fop.fo.PropertyList;
/**
* Superclass for properties that wrap an enumeration value
diff --git a/src/java/org/apache/fop/fo/properties/FixedLength.java b/src/java/org/apache/fop/fo/properties/FixedLength.java
new file mode 100644
index 000000000..c6f2a4b1d
--- /dev/null
+++ b/src/java/org/apache/fop/fo/properties/FixedLength.java
@@ -0,0 +1,127 @@
+/*
+ * $Id$
+ * ============================================================================
+ * The Apache Software License, Version 1.1
+ * ============================================================================
+ *
+ * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modifica-
+ * tion, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if any, must
+ * include the following acknowledgment: "This product includes software
+ * developed by the Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself, if
+ * and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ * endorse or promote products derived from this software without prior
+ * written permission. For written permission, please contact
+ * apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache", nor may
+ * "Apache" appear in their name, without prior written permission of the
+ * Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ============================================================================
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+package org.apache.fop.fo.properties;
+
+import org.apache.fop.fo.expr.NumericProperty;
+
+/**
+ * a length quantity in XSL
+ */
+public class FixedLength extends LengthProperty {
+
+ /**
+ * Set the length given
+ * @param numRelUnits the number of relative units
+ * @param iCurFontSize the current font size in base units.
+ */
+ public FixedLength(double numRelUnits, int iCurFontSize) {
+ setComputedValue((int)(numRelUnits * (double)iCurFontSize));
+ }
+
+ /**
+ * Set the length given a number of units and a unit name.
+ * @param numUnits quantity of input units
+ * @param units input unit specifier (in, cm, etc.)
+ */
+ public FixedLength(double numUnits, String units) {
+ convert(numUnits, units);
+ }
+
+ /**
+ * @param baseUnits the length as a number of base units (millipoints)
+ */
+ public FixedLength(int baseUnits) {
+ setComputedValue(baseUnits);
+ }
+
+ /**
+ * Convert the given length to a dimensionless integer representing
+ * a whole number of base units (milli-points).
+ * @param dvalue quantity of input units
+ * @param unit input unit specifier (in, cm, etc.)
+ */
+ protected void convert(double dvalue, String unit) {
+
+ int assumedResolution = 1; // points/pixel
+
+ if (unit.equals("in")) {
+ dvalue = dvalue * 72;
+ } else if (unit.equals("cm")) {
+ dvalue = dvalue * 28.3464567;
+ } else if (unit.equals("mm")) {
+ dvalue = dvalue * 2.83464567;
+ } else if (unit.equals("pt")) {
+ // Do nothing.
+ // dvalue = dvalue;
+ } else if (unit.equals("pc")) {
+ dvalue = dvalue * 12;
+ /*
+ * } else if (unit.equals("em")) {
+ * dvalue = dvalue * fontsize;
+ */
+ } else if (unit.equals("px")) {
+ dvalue = dvalue * assumedResolution;
+ } else {
+ dvalue = 0;
+ //log.error("unknown length unit '" + unit
+ // + "'");
+ }
+ setComputedValue((int)(dvalue * 1000));
+ }
+
+ /**
+ * @return Numeric equivalent of this
+ */
+ public NumericProperty asNumeric() {
+ return new NumericProperty(this);
+ }
+}
+
diff --git a/src/java/org/apache/fop/fo/properties/IndentPropertyMaker.java b/src/java/org/apache/fop/fo/properties/IndentPropertyMaker.java
index 7a19e784e..80344e2b2 100644
--- a/src/java/org/apache/fop/fo/properties/IndentPropertyMaker.java
+++ b/src/java/org/apache/fop/fo/properties/IndentPropertyMaker.java
@@ -51,9 +51,7 @@
package org.apache.fop.fo.properties;
import org.apache.fop.apps.FOPException;
-import org.apache.fop.datatypes.FixedLength;
import org.apache.fop.fo.FOPropertyMapping;
-import org.apache.fop.fo.Property;
import org.apache.fop.fo.PropertyList;
import org.apache.fop.fo.expr.NumericProperty;
diff --git a/src/java/org/apache/fop/fo/KeepProperty.java b/src/java/org/apache/fop/fo/properties/KeepProperty.java
index a7d659dc3..fb34f7de3 100644
--- a/src/java/org/apache/fop/fo/KeepProperty.java
+++ b/src/java/org/apache/fop/fo/properties/KeepProperty.java
@@ -1,5 +1,5 @@
/*
- * $Id: KeepProperty.java,v 1.3 2003/03/05 21:48:01 jeremias Exp $
+ * $Id$
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
@@ -48,11 +48,12 @@
* James Tauber <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
*/
-package org.apache.fop.fo;
+package org.apache.fop.fo.properties;
import org.apache.fop.apps.FOPException;
import org.apache.fop.datatypes.CompoundDatatype;
-import org.apache.fop.fo.properties.CompoundPropertyMaker;
+import org.apache.fop.fo.FObj;
+import org.apache.fop.fo.PropertyList;
/**
* Superclass for properties that wrap Keep values
@@ -70,7 +71,7 @@ public class KeepProperty extends Property implements CompoundDatatype {
/**
* @param name name of property for which Maker should be created
*/
- protected Maker(int propId) {
+ public Maker(int propId) {
super(propId);
}
diff --git a/src/java/org/apache/fop/fo/LengthPairProperty.java b/src/java/org/apache/fop/fo/properties/LengthPairProperty.java
index e56bcab2b..861346b3d 100644
--- a/src/java/org/apache/fop/fo/LengthPairProperty.java
+++ b/src/java/org/apache/fop/fo/properties/LengthPairProperty.java
@@ -1,5 +1,5 @@
/*
- * $Id: LengthPairProperty.java,v 1.3 2003/03/05 21:48:02 jeremias Exp $
+ * $Id$
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
@@ -48,11 +48,12 @@
* James Tauber <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
*/
-package org.apache.fop.fo;
+package org.apache.fop.fo.properties;
import org.apache.fop.apps.FOPException;
import org.apache.fop.datatypes.CompoundDatatype;
-import org.apache.fop.fo.properties.CompoundPropertyMaker;
+import org.apache.fop.fo.FObj;
+import org.apache.fop.fo.PropertyList;
/**
* Superclass for properties wrapping a LengthPair value
@@ -69,7 +70,7 @@ public class LengthPairProperty extends Property implements CompoundDatatype {
/**
* @param name name of property for which this Maker should be created
*/
- protected Maker(int propId) {
+ public Maker(int propId) {
super(propId);
}
diff --git a/src/java/org/apache/fop/fo/LengthProperty.java b/src/java/org/apache/fop/fo/properties/LengthProperty.java
index fd69848ce..2588f6f64 100644
--- a/src/java/org/apache/fop/fo/LengthProperty.java
+++ b/src/java/org/apache/fop/fo/properties/LengthProperty.java
@@ -1,5 +1,5 @@
/*
- * $Id: LengthProperty.java,v 1.7 2003/03/05 21:48:01 jeremias Exp $
+ * $Id$
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
@@ -48,13 +48,13 @@
* James Tauber <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
*/
-package org.apache.fop.fo;
+package org.apache.fop.fo.properties;
import org.apache.fop.apps.FOPException;
-import org.apache.fop.datatypes.AutoLength;
import org.apache.fop.datatypes.Length;
+import org.apache.fop.fo.FObj;
+import org.apache.fop.fo.PropertyList;
import org.apache.fop.fo.expr.NumericProperty;
-import org.apache.fop.fo.properties.PropertyMaker;
/**
* Superclass for properties wrapping a Length value.
diff --git a/src/java/org/apache/fop/fo/LengthRangeProperty.java b/src/java/org/apache/fop/fo/properties/LengthRangeProperty.java
index 218cf5514..3907d0f99 100644
--- a/src/java/org/apache/fop/fo/LengthRangeProperty.java
+++ b/src/java/org/apache/fop/fo/properties/LengthRangeProperty.java
@@ -1,5 +1,5 @@
/*
- * $Id: LengthRangeProperty.java,v 1.5 2003/03/05 21:48:02 jeremias Exp $
+ * $Id$
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
@@ -48,11 +48,12 @@
* James Tauber <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
*/
-package org.apache.fop.fo;
+package org.apache.fop.fo.properties;
import org.apache.fop.apps.FOPException;
import org.apache.fop.datatypes.CompoundDatatype;
-import org.apache.fop.fo.properties.CompoundPropertyMaker;
+import org.apache.fop.fo.FObj;
+import org.apache.fop.fo.PropertyList;
/**
* Superclass for properties that contain LengthRange values
@@ -75,7 +76,7 @@ public class LengthRangeProperty extends Property implements CompoundDatatype {
/**
* @param name name of property for which to create Maker
*/
- protected Maker(int propId) {
+ public Maker(int propId) {
super(propId);
}
diff --git a/src/java/org/apache/fop/fo/properties/LineHeightPropertyMaker.java b/src/java/org/apache/fop/fo/properties/LineHeightPropertyMaker.java
index b5bf98a76..743786194 100644
--- a/src/java/org/apache/fop/fo/properties/LineHeightPropertyMaker.java
+++ b/src/java/org/apache/fop/fo/properties/LineHeightPropertyMaker.java
@@ -51,10 +51,7 @@
package org.apache.fop.fo.properties;
import org.apache.fop.apps.FOPException;
-import org.apache.fop.datatypes.PercentLength;
import org.apache.fop.fo.FObj;
-import org.apache.fop.fo.LengthProperty;
-import org.apache.fop.fo.Property;
import org.apache.fop.fo.PropertyList;
/**
diff --git a/src/java/org/apache/fop/fo/properties/LinearCombinationLength.java b/src/java/org/apache/fop/fo/properties/LinearCombinationLength.java
new file mode 100644
index 000000000..898bf45ee
--- /dev/null
+++ b/src/java/org/apache/fop/fo/properties/LinearCombinationLength.java
@@ -0,0 +1,99 @@
+/*
+ * $Id$
+ * ============================================================================
+ * The Apache Software License, Version 1.1
+ * ============================================================================
+ *
+ * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modifica-
+ * tion, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if any, must
+ * include the following acknowledgment: "This product includes software
+ * developed by the Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself, if
+ * and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ * endorse or promote products derived from this software without prior
+ * written permission. For written permission, please contact
+ * apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache", nor may
+ * "Apache" appear in their name, without prior written permission of the
+ * Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ============================================================================
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+package org.apache.fop.fo.properties;
+
+import java.util.Vector;
+
+import org.apache.fop.datatypes.Length;
+
+/**
+ * Class modelling lengths that are build up by combining other lengths
+ */
+public class LinearCombinationLength extends LengthProperty {
+
+ /** Collection of factors (1-1 correspondence with {@link #lengths} */
+ protected Vector factors;
+ /** Collection of Length objects (1-1 correspondence with {@link #factors} */
+ protected Vector lengths;
+
+ /**
+ * Constructor. Creates no content. Use {link #addTerm} to build content.
+ */
+ public LinearCombinationLength() {
+ factors = new Vector();
+ lengths = new Vector();
+ }
+
+ /**
+ * Add an item to this
+ * @param factor the factor to be added
+ * @param length the Length to be added
+ */
+ public void addTerm(double factor, LengthProperty length) {
+ factors.addElement(new Double(factor));
+ lengths.addElement(length);
+ }
+
+ /**
+ * Sets the computed value in millipoints.
+ */
+ protected void computeValue() {
+ int result = 0;
+ int numFactors = factors.size();
+ for (int i = 0; i < numFactors; ++i) {
+ result +=
+ (int)(((Double)factors.elementAt(i)).doubleValue()
+ * (double)((Length)lengths.elementAt(i)).getValue());
+ }
+ setComputedValue(result);
+ }
+
+}
diff --git a/src/java/org/apache/fop/fo/ListProperty.java b/src/java/org/apache/fop/fo/properties/ListProperty.java
index 1ec8b9d9d..7ed6ac0f4 100644
--- a/src/java/org/apache/fop/fo/ListProperty.java
+++ b/src/java/org/apache/fop/fo/properties/ListProperty.java
@@ -1,5 +1,5 @@
/*
- * $Id: ListProperty.java,v 1.3 2003/03/05 21:48:01 jeremias Exp $
+ * $Id$
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
@@ -48,11 +48,12 @@
* James Tauber <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
*/
-package org.apache.fop.fo;
+package org.apache.fop.fo.properties;
import java.util.Vector;
-import org.apache.fop.fo.properties.PropertyMaker;
+import org.apache.fop.fo.FObj;
+import org.apache.fop.fo.PropertyList;
/**
* Superclass for properties that are lists of other properties
diff --git a/src/java/org/apache/fop/fo/properties/MixedLength.java b/src/java/org/apache/fop/fo/properties/MixedLength.java
new file mode 100644
index 000000000..971991121
--- /dev/null
+++ b/src/java/org/apache/fop/fo/properties/MixedLength.java
@@ -0,0 +1,150 @@
+/*
+ * $Id$
+ * ============================================================================
+ * The Apache Software License, Version 1.1
+ * ============================================================================
+ *
+ * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modifica-
+ * tion, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if any, must
+ * include the following acknowledgment: "This product includes software
+ * developed by the Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself, if
+ * and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ * endorse or promote products derived from this software without prior
+ * written permission. For written permission, please contact
+ * apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache", nor may
+ * "Apache" appear in their name, without prior written permission of the
+ * Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ============================================================================
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+package org.apache.fop.fo.properties;
+
+import java.util.Enumeration;
+import java.util.Vector;
+
+import org.apache.fop.fo.expr.NumericProperty;
+import org.apache.fop.fo.expr.PropertyException;
+
+/**
+ * A length quantity in XSL which is specified with a mixture
+ * of absolute and relative and/or percent components.
+ * The actual value may not be computable before layout is done.
+ */
+public class MixedLength extends LengthProperty {
+
+ /** The collection of Length objects comprising this MixedLength object */
+ private Vector lengths ;
+
+ /**
+ * Constructor
+ * @param lengths the collection of Length objects which comprise the new
+ * MixedLength object
+ */
+ public MixedLength(Vector lengths) {
+ this.lengths = lengths;
+ }
+
+ /**
+ * Iterates through each internal component, computing and
+ * summarizing the values, then setting the value for this
+ */
+ protected void computeValue() {
+ int computedValue = 0;
+ boolean bAllComputed = true;
+ Enumeration e = lengths.elements();
+ while (e.hasMoreElements()) {
+ LengthProperty l = (LengthProperty) e.nextElement();
+ computedValue += l.getValue();
+ if (!l.isComputed()) {
+ bAllComputed = false;
+ }
+ }
+ setComputedValue(computedValue, bAllComputed);
+ }
+
+
+ public double getTableUnits() {
+ double tableUnits = 0.0;
+ Enumeration e = lengths.elements();
+ while (e.hasMoreElements()) {
+ tableUnits += ((LengthProperty) e.nextElement()).getTableUnits();
+ }
+ return tableUnits;
+ }
+
+ public void resolveTableUnit(double dTableUnit) {
+ Enumeration e = lengths.elements();
+ while (e.hasMoreElements()) {
+ ((LengthProperty) e.nextElement()).resolveTableUnit(dTableUnit);
+ }
+ }
+
+ /**
+ * @return String equivalent of this
+ */
+ public String toString() {
+ StringBuffer sbuf = new StringBuffer();
+ Enumeration e = lengths.elements();
+ while (e.hasMoreElements()) {
+ if (sbuf.length() > 0) {
+ sbuf.append('+');
+ }
+ sbuf.append(e.nextElement().toString());
+ }
+ return sbuf.toString();
+ }
+
+ /**
+ * @return Numeric equivalent of this
+ */
+ public NumericProperty asNumeric() {
+ NumericProperty numeric = null;
+ for (Enumeration e = lengths.elements(); e.hasMoreElements();) {
+ LengthProperty l = (LengthProperty) e.nextElement();
+ if (numeric == null) {
+ numeric = l.asNumeric();
+ } else {
+ try {
+ NumericProperty sum = numeric.add(l.asNumeric());
+ numeric = sum;
+ } catch (PropertyException pe) {
+ System.err.println(
+ "Can't convert MixedLength to Numeric: " + pe);
+ }
+ }
+ }
+ return numeric;
+ }
+}
+
diff --git a/src/java/org/apache/fop/fo/NumberProperty.java b/src/java/org/apache/fop/fo/properties/NumberProperty.java
index 9288cb8d7..cccb86ddf 100644
--- a/src/java/org/apache/fop/fo/NumberProperty.java
+++ b/src/java/org/apache/fop/fo/properties/NumberProperty.java
@@ -1,5 +1,5 @@
/*
- * $Id: NumberProperty.java,v 1.6 2003/03/05 21:48:01 jeremias Exp $
+ * $Id$
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
@@ -48,10 +48,11 @@
* James Tauber <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
*/
-package org.apache.fop.fo;
+package org.apache.fop.fo.properties;
+import org.apache.fop.fo.FObj;
+import org.apache.fop.fo.PropertyList;
import org.apache.fop.fo.expr.NumericProperty;
-import org.apache.fop.fo.properties.PropertyMaker;
/**
* Class for handling numeric properties
diff --git a/src/java/org/apache/fop/fo/properties/PercentLength.java b/src/java/org/apache/fop/fo/properties/PercentLength.java
new file mode 100644
index 000000000..7d58df8d2
--- /dev/null
+++ b/src/java/org/apache/fop/fo/properties/PercentLength.java
@@ -0,0 +1,140 @@
+/*
+ * $Id$
+ * ============================================================================
+ * The Apache Software License, Version 1.1
+ * ============================================================================
+ *
+ * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modifica-
+ * tion, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if any, must
+ * include the following acknowledgment: "This product includes software
+ * developed by the Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself, if
+ * and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ * endorse or promote products derived from this software without prior
+ * written permission. For written permission, please contact
+ * apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache", nor may
+ * "Apache" appear in their name, without prior written permission of the
+ * Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ============================================================================
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+package org.apache.fop.fo.properties;
+
+import org.apache.fop.datatypes.PercentBase;
+import org.apache.fop.fo.expr.NumericProperty;
+
+/**
+ * a percent specified length quantity in XSL
+ */
+public class PercentLength extends LengthProperty {
+
+ /**
+ * The percentage itself, expressed as a decimal value, e.g. for 95%, set
+ * the value to .95
+ */
+ private double factor;
+
+ /**
+ * A PercentBase implementation that contains the base length to which the
+ * {@link #factor} should be applied to compute the actual length
+ */
+ private PercentBase lbase = null;
+
+ /**
+ * Main constructor. Construct an object based on a factor (the percent,
+ * as a factor) and an object which has a method to return the Length which
+ * provides the "base" for the actual length that is modeled.
+ * @param factor the percentage factor, expressed as a decimal (e.g. use
+ * .95 to represent 95%)
+ * @param lbase base property to which the factor should be applied
+ */
+ public PercentLength(double factor, PercentBase lbase) {
+ this.factor = factor;
+ this.lbase = lbase;
+ }
+
+ /**
+ * Convenience constructor when only the factor is known
+ * @param factor the percentage factor, expressed as a decimal (e.g. use
+ * .95 to represent 95%)
+ */
+ public PercentLength(double factor) {
+ this(factor, null);
+ }
+
+ /**
+ * @param lbase the base to set
+ */
+ public void setBaseLength(PercentBase lbase) {
+ this.lbase = lbase;
+ }
+
+ /**
+ * @return the base
+ */
+ public PercentBase getBaseLength() {
+ return this.lbase;
+ }
+
+ /**
+ * Return the computed value in millipoints. This assumes that the
+ * base length has been resolved to an absolute length value.
+ */
+ protected void computeValue() {
+ setComputedValue((int)(factor * (double)lbase.getBaseLength()));
+ }
+
+ /**
+ *
+ * @return the factor
+ */
+ public double value() {
+ return factor;
+ }
+
+ /**
+ * @return the String equivalent of this
+ */
+ public String toString() {
+ // TODO: What about the base value?
+ return (new Double(factor * 100.0).toString()) + "%";
+ }
+
+ /**
+ * @return new Numeric object that is equivalent to this
+ */
+ public NumericProperty asNumeric() {
+ return new NumericProperty(this);
+ }
+
+}
diff --git a/src/java/org/apache/fop/fo/Property.java b/src/java/org/apache/fop/fo/properties/Property.java
index 80b68d4ed..855f60a00 100644
--- a/src/java/org/apache/fop/fo/Property.java
+++ b/src/java/org/apache/fop/fo/properties/Property.java
@@ -1,5 +1,5 @@
/*
- * $Id: Property.java,v 1.22 2003/03/05 21:48:02 jeremias Exp $
+ * $Id$
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
@@ -48,9 +48,10 @@
* James Tauber <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
*/
-package org.apache.fop.fo;
+package org.apache.fop.fo.properties;
import org.apache.fop.fo.expr.NumericProperty;
+
import java.util.Vector;
/**
diff --git a/src/java/org/apache/fop/fo/properties/PropertyMaker.java b/src/java/org/apache/fop/fo/properties/PropertyMaker.java
index 77465a58b..0c130b190 100644
--- a/src/java/org/apache/fop/fo/properties/PropertyMaker.java
+++ b/src/java/org/apache/fop/fo/properties/PropertyMaker.java
@@ -59,8 +59,6 @@ import org.apache.fop.datatypes.LengthBase;
import org.apache.fop.datatypes.PercentBase;
import org.apache.fop.fo.FOPropertyMapping;
import org.apache.fop.fo.FObj;
-import org.apache.fop.fo.ListProperty;
-import org.apache.fop.fo.Property;
import org.apache.fop.fo.PropertyList;
import org.apache.fop.fo.ShorthandParser;
import org.apache.fop.fo.expr.PropertyInfo;
diff --git a/src/java/org/apache/fop/fo/SpaceProperty.java b/src/java/org/apache/fop/fo/properties/SpaceProperty.java
index 7f2c15425..c67e8042a 100644
--- a/src/java/org/apache/fop/fo/SpaceProperty.java
+++ b/src/java/org/apache/fop/fo/properties/SpaceProperty.java
@@ -1,5 +1,5 @@
/*
- * $Id: SpaceProperty.java,v 1.5 2003/03/05 21:48:01 jeremias Exp $
+ * $Id$
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
@@ -48,10 +48,11 @@
* James Tauber <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
*/
-package org.apache.fop.fo;
+package org.apache.fop.fo.properties;
import org.apache.fop.apps.FOPException;
-import org.apache.fop.fo.properties.CompoundPropertyMaker;
+import org.apache.fop.fo.FObj;
+import org.apache.fop.fo.PropertyList;
/**
* Base class used for handling properties of the fo:space-before and
@@ -70,7 +71,7 @@ public class SpaceProperty extends LengthRangeProperty {
/**
* @param name name of the property whose Maker is to be created
*/
- protected Maker(int propId) {
+ public Maker(int propId) {
super(propId);
}
diff --git a/src/java/org/apache/fop/fo/StringProperty.java b/src/java/org/apache/fop/fo/properties/StringProperty.java
index 612e419b5..5ba630957 100644
--- a/src/java/org/apache/fop/fo/StringProperty.java
+++ b/src/java/org/apache/fop/fo/properties/StringProperty.java
@@ -1,5 +1,5 @@
/*
- * $Id: StringProperty.java,v 1.4 2003/03/05 21:48:01 jeremias Exp $
+ * $Id$
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
@@ -48,9 +48,10 @@
* James Tauber <jtauber@jtauber.com>. For more information on the Apache
* Software Foundation, please see <http://www.apache.org/>.
*/
-package org.apache.fop.fo;
+package org.apache.fop.fo.properties;
-import org.apache.fop.fo.properties.PropertyMaker;
+import org.apache.fop.fo.FObj;
+import org.apache.fop.fo.PropertyList;
/**
* Exists primarily as a container for its Maker inner class, which is
diff --git a/src/java/org/apache/fop/fo/properties/TableColLength.java b/src/java/org/apache/fop/fo/properties/TableColLength.java
new file mode 100644
index 000000000..752fea6a0
--- /dev/null
+++ b/src/java/org/apache/fop/fo/properties/TableColLength.java
@@ -0,0 +1,121 @@
+/*
+ * $Id$
+ * ============================================================================
+ * The Apache Software License, Version 1.1
+ * ============================================================================
+ *
+ * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modifica-
+ * tion, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if any, must
+ * include the following acknowledgment: "This product includes software
+ * developed by the Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself, if
+ * and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ * endorse or promote products derived from this software without prior
+ * written permission. For written permission, please contact
+ * apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache", nor may
+ * "Apache" appear in their name, without prior written permission of the
+ * Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ============================================================================
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+package org.apache.fop.fo.properties;
+
+import org.apache.fop.fo.expr.NumericProperty;
+
+/**
+ * A table-column width specification, possibly including some
+ * number of proportional "column-units". The absolute size of a
+ * column-unit depends on the fixed and proportional sizes of all
+ * columns in the table, and on the overall size of the table.
+ * It can't be calculated until all columns have been specified and until
+ * the actual width of the table is known. Since this can be specified
+ * as a percent of its parent containing width, the calculation is done
+ * during layout.
+ * NOTE: this is only supposed to be allowed if table-layout=fixed.
+ */
+public class TableColLength extends LengthProperty {
+
+ /**
+ * Number of table-column proportional units
+ */
+ private double tcolUnits;
+
+ /**
+ * Construct an object with tcolUnits of proportional measure.
+ * @param tcolUnits number of table-column proportional units
+ */
+ public TableColLength(double tcolUnits) {
+ this.tcolUnits = tcolUnits;
+ }
+
+ /**
+ * Override the method in Length
+ * @return the number of specified proportional table-column units.
+ */
+ public double getTableUnits() {
+ return tcolUnits;
+ }
+
+ /**
+ * Calculate the number of millipoints and set it.
+ * @param mpointsPerUnit density of millipoints per unit
+ */
+ public void resolveTableUnit(double mpointsPerUnit) {
+ setComputedValue((int)(tcolUnits * mpointsPerUnit));
+ }
+
+ //If the table-unit can be resolved, set the computed value
+ /*protected void computeValue() {
+ if (tblUnitBase.canResolveUnit()) {
+ rslt += (int)(tcolUnits * (double)tblUnitBase.getUnitValue());
+ setComputedValue(rslt);
+ }
+ }*/
+
+ /**
+ * Convert this to a String
+ * @return the string representation of this
+ */
+ public String toString() {
+ return (Double.toString(tcolUnits) + " table-column-units");
+ }
+
+ /**
+ * Converts this to a new Numeric object
+ * @return the Numeric object
+ */
+ public NumericProperty asNumeric() {
+ return new NumericProperty(this);
+ }
+}
+
diff --git a/src/java/org/apache/fop/fo/properties/ToBeImplementedProperty.java b/src/java/org/apache/fop/fo/properties/ToBeImplementedProperty.java
new file mode 100644
index 000000000..77db03940
--- /dev/null
+++ b/src/java/org/apache/fop/fo/properties/ToBeImplementedProperty.java
@@ -0,0 +1,91 @@
+/*
+ * $Id$
+ * ============================================================================
+ * The Apache Software License, Version 1.1
+ * ============================================================================
+ *
+ * Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modifica-
+ * tion, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if any, must
+ * include the following acknowledgment: "This product includes software
+ * developed by the Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself, if
+ * and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "FOP" and "Apache Software Foundation" must not be used to
+ * endorse or promote products derived from this software without prior
+ * written permission. For written permission, please contact
+ * apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache", nor may
+ * "Apache" appear in their name, without prior written permission of the
+ * Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
+ * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ============================================================================
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * on behalf of the Apache Software Foundation and was originally created by
+ * James Tauber <jtauber@jtauber.com>. For more information on the Apache
+ * Software Foundation, please see <http://www.apache.org/>.
+ */
+package org.apache.fop.fo.properties;
+
+import org.apache.fop.fo.FObj;
+import org.apache.fop.fo.PropertyList;
+
+public class ToBeImplementedProperty extends Property {
+
+ public static class Maker extends PropertyMaker {
+
+ public Maker(int propId) {
+ super(propId);
+ }
+
+ public Property convertProperty(Property p,
+ PropertyList propertyList, FObj fo) {
+ if (p instanceof ToBeImplementedProperty) {
+ return p;
+ }
+
+ ToBeImplementedProperty val =
+ new ToBeImplementedProperty(getPropId());
+ return val;
+ }
+ }
+
+ /**
+ * Constructor
+ * @param propName name of Property
+ */
+ public ToBeImplementedProperty(int propId) {
+
+ //XXX: (mjg@recalldesign.com) This is a bit of a kluge, perhaps an
+ //UnimplementedPropertyException or something similar should
+ //get thrown here instead.
+
+// Logger log = Hierarchy.getDefaultHierarchy().getLoggerFor("fop");
+// log.warn("property - \"" + propName
+// + "\" is not implemented yet.");
+ }
+}
+