diff options
author | Finn Bock <bckfnn@apache.org> | 2004-10-19 08:53:51 +0000 |
---|---|---|
committer | Finn Bock <bckfnn@apache.org> | 2004-10-19 08:53:51 +0000 |
commit | b0839fa1f93f128c6dd271930209e59228bb0472 (patch) | |
tree | f3ed77c6f9d3f58314beb64e7557eaf117f2d6aa /src/java/org/apache/fop/fo/flow/MultiSwitch.java | |
parent | 85506764aad78e6aa4b675838aaed1f6fd23883a (diff) | |
download | xmlgraphics-fop-b0839fa1f93f128c6dd271930209e59228bb0472.tar.gz xmlgraphics-fop-b0839fa1f93f128c6dd271930209e59228bb0472.zip |
First phase of performance improvement. Added bind() and startOfNode()
methods to the FO nodes, unused for now.
PR: 31699
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198054 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/flow/MultiSwitch.java')
-rw-r--r-- | src/java/org/apache/fop/fo/flow/MultiSwitch.java | 42 |
1 files changed, 36 insertions, 6 deletions
diff --git a/src/java/org/apache/fop/fo/flow/MultiSwitch.java b/src/java/org/apache/fop/fo/flow/MultiSwitch.java index 77f859215..f0a72a0ad 100644 --- a/src/java/org/apache/fop/fo/flow/MultiSwitch.java +++ b/src/java/org/apache/fop/fo/flow/MultiSwitch.java @@ -25,12 +25,19 @@ import org.xml.sax.SAXParseException; // FOP import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; +import org.apache.fop.fo.PropertyList; +import org.apache.fop.fo.properties.CommonAccessibility; /** * Class modelling the fo:multi-switch object. * @todo needs implementation */ public class MultiSwitch extends FObj { + // The value of properties relevant for fo:multi-switch. + private CommonAccessibility commonAccessibility; + // private ToBeImplementedProperty autoRestore; + private String id; + // End of property values static boolean notImplementedWarningGiven = false; @@ -47,6 +54,32 @@ public class MultiSwitch extends FObj { } /** + * @see org.apache.fop.fo.FObj#bind(PropertyList) + */ + public void bind(PropertyList pList) { + commonAccessibility = pList.getAccessibilityProps(); + // autoRestore = pList.get(PR_AUTO_RESTORE); + id = pList.get(PR_ID).getString(); + } + + /** + * @see org.apache.fop.fo.FONode#startOfNode + */ + protected void startOfNode() throws SAXParseException { + checkId(id); + } + + /** + * Make sure content model satisfied. + * @see org.apache.fop.fo.FONode#endOfNode + */ + protected void endOfNode() throws SAXParseException { + if (childNodes == null) { + missingChildElementError("(multi-case+)"); + } + } + + /** * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String) * XSL Content Model: (multi-case+) */ @@ -58,13 +91,10 @@ public class MultiSwitch extends FObj { } /** - * Make sure content model satisfied. - * @see org.apache.fop.fo.FONode#endOfNode + * Return the "id" property. */ - protected void endOfNode() throws SAXParseException { - if (childNodes == null) { - missingChildElementError("(multi-case+)"); - } + public String getId() { + return id; } /** |