]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Removed applicableProps, getEndElement() and
authorPeter Bernard West <pbwest@apache.org>
Wed, 30 Oct 2002 13:44:03 +0000 (13:44 +0000)
committerPeter Bernard West <pbwest@apache.org>
Wed, 30 Oct 2002 13:44:03 +0000 (13:44 +0000)
getPropertyValue().  Extends FoRegionBeforeAfter/FoRegionStartEnd.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@195378 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/fo/pagination/FoRegionAfter.java
src/org/apache/fop/fo/pagination/FoRegionBefore.java
src/org/apache/fop/fo/pagination/FoRegionEnd.java
src/org/apache/fop/fo/pagination/FoRegionStart.java

index be9eada76ff18f7553bc47120ce1239ac75c06c8..3131601e10cf1199415ddaca22df5cf2fb5ad356 100644 (file)
 package org.apache.fop.fo.pagination;
 
 // FOP
-import org.apache.fop.fo.FOAttributes;
-import org.apache.fop.fo.PropNames;
-import org.apache.fop.fo.FOPropertySets;
-import org.apache.fop.fo.PropertySets;
 import org.apache.fop.fo.FObjectNames;
 import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.FOTree;
@@ -21,11 +17,6 @@ import org.apache.fop.fo.expr.PropertyException;
 import org.apache.fop.xml.FoXMLEvent;
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.datastructs.Tree;
-import org.apache.fop.datatypes.PropertyValue;
-import org.apache.fop.datatypes.Ints;
-
-import java.util.HashMap;
-import java.util.BitSet;
 
 /**
  * Implements the fo:simple-page-master flow object
@@ -35,11 +26,6 @@ public class FoRegionAfter extends FoRegionBeforeAfter {
     private static final String tag = "$Name$";
     private static final String revision = "$Revision$";
 
-    /** The array of applicable properties. Slots in this array are indexed
-        by values from the <i>applicableProps</i> <tt>HashMap</tt>.
-        It is effectively a sparse array of the set of properties. */
-    private PropertyValue[] applicableProps;
-
     /**
      * @param foTree the FO tree being built
      * @param parent the parent FONode of this node
@@ -50,21 +36,7 @@ public class FoRegionAfter extends FoRegionBeforeAfter {
         throws Tree.TreeException, FOPException
     {
         super(foTree, FObjectNames.REGION_AFTER, parent, event);
-        applicableProps = new PropertyValue[numProps];
-        FoXMLEvent ev = xmlevents.getEndElement(event);
+        makeSparsePropsSet();
     }
 
-    /**
-     * Get a property value applying to this FO node.
-     * @param property - the <tt>int</tt> property index.
-     * @return the <tt>PropertyValue</tt> with the indicated property index.
-     */
-    public PropertyValue getPropertyValue(int property)
-            throws PropertyException
-    {
-        return applicableProps[
-            ((Integer)
-            (applicablePropsHash.get(Ints.consts.get(property)))).intValue()
-        ];
-    }
 }
index 09bdb29a23bdd356dce25a31fb7a83bac678011d..dc45f821448fa62ab1fd2ba5c2006bb06e6b7ed7 100644 (file)
 package org.apache.fop.fo.pagination;
 
 // FOP
-import org.apache.fop.fo.FOAttributes;
-import org.apache.fop.fo.PropNames;
-import org.apache.fop.fo.FOPropertySets;
-import org.apache.fop.fo.PropertySets;
 import org.apache.fop.fo.FObjectNames;
 import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.FOTree;
@@ -21,11 +17,6 @@ import org.apache.fop.fo.expr.PropertyException;
 import org.apache.fop.xml.FoXMLEvent;
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.datastructs.Tree;
-import org.apache.fop.datatypes.PropertyValue;
-import org.apache.fop.datatypes.Ints;
-
-import java.util.HashMap;
-import java.util.BitSet;
 
 /**
  * Implements the fo:simple-page-master flow object
@@ -35,11 +26,6 @@ public class FoRegionBefore extends FoRegionBeforeAfter {
     private static final String tag = "$Name$";
     private static final String revision = "$Revision$";
 
-    /** The array of applicable properties. Slots in this array are indexed
-        by values from the <i>applicableProps</i> <tt>HashMap</tt>.
-        It is effectively a sparse array of the set of properties. */
-    private PropertyValue[] applicableProps;
-
     /**
      * @param foTree the FO tree being built
      * @param parent the parent FONode of this node
@@ -50,21 +36,7 @@ public class FoRegionBefore extends FoRegionBeforeAfter {
         throws Tree.TreeException, FOPException
     {
         super(foTree, FObjectNames.REGION_BEFORE, parent, event);
-        applicableProps = new PropertyValue[numProps];
-        FoXMLEvent ev = xmlevents.getEndElement(event);
+        makeSparsePropsSet();
     }
 
-    /**
-     * Get a property value applying to this FO node.
-     * @param property - the <tt>int</tt> property index.
-     * @return the <tt>PropertyValue</tt> with the indicated property index.
-     */
-    public PropertyValue getPropertyValue(int property)
-            throws PropertyException
-    {
-        return applicableProps[
-            ((Integer)
-            (applicablePropsHash.get(Ints.consts.get(property)))).intValue()
-        ];
-    }
 }
index 5cc95b2551245aa076272a558e1c0ea2b1675c76..7e653ff8143d602cbf16ee7d97973ef657801103 100644 (file)
 package org.apache.fop.fo.pagination;
 
 // FOP
-import org.apache.fop.fo.FOAttributes;
-import org.apache.fop.fo.PropNames;
-import org.apache.fop.fo.FOPropertySets;
-import org.apache.fop.fo.PropertySets;
 import org.apache.fop.fo.FObjectNames;
 import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.FOTree;
@@ -21,11 +17,7 @@ import org.apache.fop.fo.expr.PropertyException;
 import org.apache.fop.xml.FoXMLEvent;
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.datastructs.Tree;
-import org.apache.fop.datatypes.PropertyValue;
-import org.apache.fop.datatypes.Ints;
 
-import java.util.HashMap;
-import java.util.BitSet;
 
 /**
  * Implements the fo:simple-page-master flow object
@@ -35,11 +27,6 @@ public class FoRegionEnd extends FoRegionStartEnd {
     private static final String tag = "$Name$";
     private static final String revision = "$Revision$";
 
-    /** The array of applicable properties. Slots in this array are indexed
-        by values from the <i>applicableProps</i> <tt>HashMap</tt>.
-        It is effectively a sparse array of the set of properties. */
-    private PropertyValue[] applicableProps;
-
     /**
      * @param foTree the FO tree being built
      * @param parent the parent FONode of this node
@@ -50,21 +37,7 @@ public class FoRegionEnd extends FoRegionStartEnd {
         throws Tree.TreeException, FOPException
     {
         super(foTree, FObjectNames.REGION_END, parent, event);
-        applicableProps = new PropertyValue[numProps];
-        FoXMLEvent ev = xmlevents.getEndElement(event);
+        makeSparsePropsSet();
     }
 
-    /**
-     * Get a property value applying to this FO node.
-     * @param property - the <tt>int</tt> property index.
-     * @return the <tt>PropertyValue</tt> with the indicated property index.
-     */
-    public PropertyValue getPropertyValue(int property)
-            throws PropertyException
-    {
-        return applicableProps[
-            ((Integer)
-            (applicablePropsHash.get(Ints.consts.get(property)))).intValue()
-        ];
-    }
 }
index fb6f33c7077c2045ee7be206b8a5310a697ed121..33aafa72734ac3d57d3153841e7aa389ecfcc7b8 100644 (file)
 package org.apache.fop.fo.pagination;
 
 // FOP
-import org.apache.fop.fo.FOAttributes;
-import org.apache.fop.fo.PropNames;
-import org.apache.fop.fo.FOPropertySets;
-import org.apache.fop.fo.PropertySets;
 import org.apache.fop.fo.FObjectNames;
 import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.FOTree;
@@ -21,11 +17,6 @@ import org.apache.fop.fo.expr.PropertyException;
 import org.apache.fop.xml.FoXMLEvent;
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.datastructs.Tree;
-import org.apache.fop.datatypes.PropertyValue;
-import org.apache.fop.datatypes.Ints;
-
-import java.util.HashMap;
-import java.util.BitSet;
 
 /**
  * Implements the fo:simple-page-master flow object
@@ -35,11 +26,6 @@ public class FoRegionStart extends FoRegionStartEnd {
     private static final String tag = "$Name$";
     private static final String revision = "$Revision$";
 
-    /** The array of applicable properties. Slots in this array are indexed
-        by values from the <i>applicableProps</i> <tt>HashMap</tt>.
-        It is effectively a sparse array of the set of properties. */
-    private PropertyValue[] applicableProps;
-
     /**
      * @param foTree the FO tree being built
      * @param parent the parent FONode of this node
@@ -50,21 +36,7 @@ public class FoRegionStart extends FoRegionStartEnd {
         throws Tree.TreeException, FOPException
     {
         super(foTree, FObjectNames.REGION_START, parent, event);
-        applicableProps = new PropertyValue[numProps];
-        FoXMLEvent ev = xmlevents.getEndElement(event);
+        makeSparsePropsSet();
     }
 
-    /**
-     * Get a property value applying to this FO node.
-     * @param property - the <tt>int</tt> property index.
-     * @return the <tt>PropertyValue</tt> with the indicated property index.
-     */
-    public PropertyValue getPropertyValue(int property)
-            throws PropertyException
-    {
-        return applicableProps[
-            ((Integer)
-            (applicablePropsHash.get(Ints.consts.get(property)))).intValue()
-        ];
-    }
 }