aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache
diff options
context:
space:
mode:
authorFinn Bock <bckfnn@apache.org>2004-10-20 18:21:27 +0000
committerFinn Bock <bckfnn@apache.org>2004-10-20 18:21:27 +0000
commit21faccdc8c9b02f1ebe153ef549d9892c1b5115c (patch)
tree9217fbf6ad249652cee1fa5702a09a463b129a16 /src/java/org/apache
parent8a84b42f3ec6471dc8dfd82a741239010c7576c7 (diff)
downloadxmlgraphics-fop-21faccdc8c9b02f1ebe153ef549d9892c1b5115c.tar.gz
xmlgraphics-fop-21faccdc8c9b02f1ebe153ef549d9892c1b5115c.zip
Fourth phase of performance improvement.
- Remove propertyList from FObj. PR: 31699 git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198094 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache')
-rw-r--r--src/java/org/apache/fop/fo/FObj.java67
-rw-r--r--src/java/org/apache/fop/fo/flow/TableRow.java19
2 files changed, 4 insertions, 82 deletions
diff --git a/src/java/org/apache/fop/fo/FObj.java b/src/java/org/apache/fop/fo/FObj.java
index 54b585133..d50fd98fc 100644
--- a/src/java/org/apache/fop/fo/FObj.java
+++ b/src/java/org/apache/fop/fo/FObj.java
@@ -26,7 +26,6 @@ import java.util.Map;
import java.util.Set;
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;
@@ -39,9 +38,6 @@ import org.xml.sax.SAXParseException;
public class FObj extends FONode implements Constants {
public static PropertyMaker[] propertyListTable = null;
- /** Formatting properties for this fo element. */
- protected PropertyList propertyList;
-
/** The immediate child nodes of this node. */
public ArrayList childNodes = null;
@@ -96,9 +92,9 @@ public class FObj extends FONode implements Constants {
public void processNode(String elementName, Locator locator,
Attributes attlist, PropertyList pList) throws SAXParseException {
setLocator(locator);
- propertyList.addAttributesToList(attlist);
- propertyList.setWritingMode();
- bind(propertyList);
+ pList.addAttributesToList(attlist);
+ pList.setWritingMode();
+ bind(pList);
}
/**
@@ -106,8 +102,7 @@ public class FObj extends FONode implements Constants {
*/
protected PropertyList createPropertyList(PropertyList parent, FOEventHandler foEventHandler) throws SAXParseException {
//return foEventHandler.getPropertyListMaker().make(this, parent);
- propertyList = new StaticPropertyList(this, parent);
- return propertyList;
+ return new StaticPropertyList(this, parent);
}
/**
@@ -148,60 +143,6 @@ public class FObj extends FONode implements Constants {
}
/**
- * Return the property list object for this FO. PropertyList tends
- * to hold the base, pre-trait properties for this FO, either explicitly
- * declared in the input XML or from inherited values.
- */
- public PropertyList getPropertyList() {
- return propertyList;
- }
-
- /**
- * Helper method to quickly obtain the value of a property
- * for this FO, without querying for the propertyList first.
- * @param propId - the Constants ID of the desired property to obtain
- * @return the property
- */
- public Property getProperty(int propId) {
- return propertyList.get(propId);
- }
-
- /**
- * Convenience method to quickly obtain the String value of a property
- * for this FO, without querying for the propertyList first.
- * Meaningful only for properties having a string representation
- * @param propId - the Constants ID of the desired property to obtain
- * @return the String value of the property value
- */
- public String getPropString(int propId) {
- return propertyList.get(propId).getString();
- }
-
- /**
- * Convenience method to quickly obtain the length value of a property
- * for this FO, without querying for the propertyList first.
- * Meaningful only for properties having a length representation
- * Note: getValue() only correct after resolution completed, therefore
- * should be called only in layout manager code.
- * @param propId - the Constants ID of the desired property to obtain
- * @return the length value of the property value
- */
- public int getPropLength(int propId) {
- return propertyList.get(propId).getLength().getValue();
- }
-
- /**
- * Convenience method to quickly obtain the Constants class enumeration
- * value of a property for this FO. Meaningful only for properties
- * having an enumeration representation
- * @param propId - the Constants ID of the desired property to obtain
- * @return the enumeration value of the property value
- */
- public int getPropEnum(int propId) {
- return propertyList.get(propId).getEnum();
- }
-
- /**
* @see org.apache.fop.fo.FONode#addChildNode(FONode)
*/
protected void addChildNode(FONode child) throws SAXParseException {
diff --git a/src/java/org/apache/fop/fo/flow/TableRow.java b/src/java/org/apache/fop/fo/flow/TableRow.java
index 5da858d95..74a317155 100644
--- a/src/java/org/apache/fop/fo/flow/TableRow.java
+++ b/src/java/org/apache/fop/fo/flow/TableRow.java
@@ -26,7 +26,6 @@ import org.xml.sax.Locator;
import org.xml.sax.SAXParseException;
// FOP
-import org.apache.fop.datatypes.KeepValue;
import org.apache.fop.datatypes.Length;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
@@ -38,9 +37,6 @@ import org.apache.fop.fo.properties.CommonRelativePosition;
import org.apache.fop.fo.properties.KeepProperty;
import org.apache.fop.fo.properties.LengthRangeProperty;
import org.apache.fop.layoutmgr.table.Row;
-import org.apache.fop.fo.Constants;
-import org.apache.fop.fo.properties.Property;
-
/**
* Class modelling the fo:table-row object.
@@ -127,21 +123,6 @@ public class TableRow extends FObj {
}
}
- private KeepValue getKeepValue(int propId) {
- Property p = this.propertyList.get(propId);
- Number n = p.getNumber();
- if (n != null) {
- return new KeepValue(KeepValue.KEEP_WITH_VALUE, n.intValue());
- }
- switch (p.getEnum()) {
- case Constants.ALWAYS:
- return new KeepValue(KeepValue.KEEP_WITH_ALWAYS, 0);
- case Constants.AUTO:
- default:
- return new KeepValue(KeepValue.KEEP_WITH_AUTO, 0);
- }
- }
-
/**
* Return the "id" property.
*/