01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: /* $Id: MultiCase.java 554094 2007-07-07 00:04:25Z adelmelle $ */
19:
20: package org.apache.fop.fo.flow;
21:
22: import org.apache.fop.apps.FOPException;
23: import org.apache.fop.fo.FONode;
24: import org.apache.fop.fo.FObj;
25: import org.apache.fop.fo.PropertyList;
26: import org.apache.fop.fo.properties.CommonAccessibility;
27:
28: /**
29: * Class modelling the fo:multi-case object.
30: * @todo implement validateChildNode()
31: */
32: public class MultiCase extends FObj {
33: // The value of properties relevant for fo:multi-case.
34: private String id;
35: private int startingState;
36: // private ToBeImplementedProperty caseName;
37: // private ToBeImplementedProperty caseTitle;
38: // Unused but valid items, commented out for performance:
39: // private CommonAccessibility commonAccessibility;
40: // End of property values
41:
42: static boolean notImplementedWarningGiven = false;
43:
44: /**
45: * @param parent FONode that is the parent of this object
46: */
47: public MultiCase(FONode parent) {
48: super (parent);
49:
50: if (!notImplementedWarningGiven) {
51: log.warn("fo:multi-case is not yet implemented.");
52: notImplementedWarningGiven = true;
53: }
54: }
55:
56: /**
57: * @see org.apache.fop.fo.FObj#bind(PropertyList)
58: */
59: public void bind(PropertyList pList) throws FOPException {
60: super .bind(pList);
61: startingState = pList.get(PR_STARTING_STATE).getEnum();
62: // caseName = pList.get(PR_CASE_NAME);
63: // caseTitle = pList.get(PR_CASE_TITLE);
64: }
65:
66: /**
67: * Return the "starting-state" property.
68: */
69: public int getStartingState() {
70: return startingState;
71: }
72:
73: /** @see org.apache.fop.fo.FONode#getLocalName() */
74: public String getLocalName() {
75: return "multi-case";
76: }
77:
78: /**
79: * @see org.apache.fop.fo.FObj#getNameId()
80: */
81: public int getNameId() {
82: return FO_MULTI_CASE;
83: }
84: }
|