aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/flow/table/TableCaption.java
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2007-11-05 17:42:37 +0000
committerVincent Hennebert <vhennebert@apache.org>2007-11-05 17:42:37 +0000
commit740a2f598cf99291aa781eee9e1d59957ae3099e (patch)
treebf4c38bb397cb1de0b9806f325a2a4a96590b070 /src/java/org/apache/fop/fo/flow/table/TableCaption.java
parenta09f99a58e99a5179d74e5b00f7d246a03790e81 (diff)
downloadxmlgraphics-fop-740a2f598cf99291aa781eee9e1d59957ae3099e.tar.gz
xmlgraphics-fop-740a2f598cf99291aa781eee9e1d59957ae3099e.zip
Moved table-related FObj into new o.a.fop.fo.flow.table package
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@592103 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/flow/table/TableCaption.java')
-rw-r--r--src/java/org/apache/fop/fo/flow/table/TableCaption.java110
1 files changed, 110 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/fo/flow/table/TableCaption.java b/src/java/org/apache/fop/fo/flow/table/TableCaption.java
new file mode 100644
index 000000000..28174067c
--- /dev/null
+++ b/src/java/org/apache/fop/fo/flow/table/TableCaption.java
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id$ */
+
+package org.apache.fop.fo.flow.table;
+
+// XML
+import org.xml.sax.Locator;
+
+import org.apache.fop.apps.FOPException;
+import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.FObj;
+import org.apache.fop.fo.PropertyList;
+import org.apache.fop.fo.ValidationException;
+
+
+/**
+ * Class modelling the fo:table-caption object.
+ */
+public class TableCaption extends FObj {
+ // The value of properties relevant for fo:table-caption.
+ // Unused but valid items, commented out for performance:
+ // private CommonAural commonAural;
+ // private CommonRelativePosition commonRelativePosition;
+ // private LengthRangeProperty blockProgressionDimension;
+ // private Length height;
+ // private LengthRangeProperty inlineProgressionDimension;
+ // private int intrusionDisplace;
+ // private KeepProperty keepTogether;
+ // private Length width;
+ // End of property values
+
+ /** used for FO validation */
+ private boolean blockItemFound = false;
+
+ static boolean notImplementedWarningGiven = false;
+
+ /**
+ * @param parent FONode that is the parent of this object
+ */
+ public TableCaption(FONode parent) {
+ super(parent);
+
+ if (!notImplementedWarningGiven) {
+ log.warn("fo:table-caption is not yet implemented.");
+ notImplementedWarningGiven = true;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void bind(PropertyList pList) throws FOPException {
+ super.bind(pList);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected void endOfNode() throws FOPException {
+ if (firstChild == null) {
+ missingChildElementError("marker* (%block;)");
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ * XSL Content Model: marker* (%block;)
+ */
+ protected void validateChildNode(Locator loc, String nsURI, String localName)
+ throws ValidationException {
+ if (FO_URI.equals(nsURI) && localName.equals("marker")) {
+ if (blockItemFound) {
+ nodesOutOfOrderError(loc, "fo:marker", "(%block;)");
+ }
+ } else if (!isBlockItem(nsURI, localName)) {
+ invalidChildError(loc, nsURI, localName);
+ } else {
+ blockItemFound = true;
+ }
+ }
+
+ /** {@inheritDoc} */
+ public String getLocalName() {
+ return "table-caption";
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getNameId() {
+ return FO_TABLE_CAPTION;
+ }
+}
+