aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/fo/FObj.java
diff options
context:
space:
mode:
authorKaren Lease <klease@apache.org>2001-03-04 21:29:46 +0000
committerKaren Lease <klease@apache.org>2001-03-04 21:29:46 +0000
commit8384a7fb718ade0bb485ce7bb1caed81ac2a4f62 (patch)
tree50976229bfb8844de04a8dc419eae6b68041745d /src/org/apache/fop/fo/FObj.java
parent45ffd37060fb91b80f2e4147e7324fb827714365 (diff)
downloadxmlgraphics-fop-8384a7fb718ade0bb485ce7bb1caed81ac2a4f62.tar.gz
xmlgraphics-fop-8384a7fb718ade0bb485ce7bb1caed81ac2a4f62.zip
Support for border-related shorthand properties and PropertyManager delegate object
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194124 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/fo/FObj.java')
-rw-r--r--src/org/apache/fop/fo/FObj.java24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/org/apache/fop/fo/FObj.java b/src/org/apache/fop/fo/FObj.java
index 2011ef140..053758b11 100644
--- a/src/org/apache/fop/fo/FObj.java
+++ b/src/org/apache/fop/fo/FObj.java
@@ -78,17 +78,23 @@ public class FObj extends FONode {
// protected PropertyList properties;
public PropertyList properties;
+ protected PropertyManager propMgr;
protected String name;
protected FObj(FObj parent, PropertyList propertyList) {
super(parent);
- this.properties = propertyList;
+ this.properties = propertyList; // TO BE REMOVED!!!
propertyList.setFObj(this);
+ this.propMgr = makePropertyManager(propertyList);
this.name = "default FO";
setWritingMode();
}
+ protected PropertyManager makePropertyManager(PropertyList propertyList) {
+ return new PropertyManager(propertyList);
+ }
+
/**
* adds characters (does nothing here)
* @param data text
@@ -187,17 +193,15 @@ public class FObj extends FONode {
* Set writing mode for this FO.
* Find nearest ancestor, including self, which generates
* reference areas and use the value of its writing-mode property.
+ * If no such ancestor is found, use the value on the root FO.
*/
private void setWritingMode() {
- FObj p = this;
- while (p!= null && !p.generatesReferenceAreas())
- p = p.getParent();
- if (p != null) {
- this.properties.setWritingMode(p.getProperty("writing-mode").getEnum());
- }
- else {
- // shouldn't happen!!!
- }
+ FObj p ;
+ FObj parent;
+ for (p=this;
+ !p.generatesReferenceAreas() && (parent = p.getParent()) != null;
+ p=parent);
+ this.properties.setWritingMode(p.getProperty("writing-mode").getEnum());
}