1 /*
2 * Copyright 2002 - 2007 JEuclid, http://jeuclid.sf.net
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 /* $Id: Mlabeledtr.java,v 2986a8eeaebc 2009/09/24 12:53:08 max $ */
18
19 package net.sourceforge.jeuclid.elements.presentation.table;
20
21 import org.apache.batik.dom.AbstractDocument;
22 import org.w3c.dom.Node;
23 import org.w3c.dom.mathml.MathMLElement;
24 import org.w3c.dom.mathml.MathMLLabeledRowElement;
25
26 /**
27 * This class represents the mlabeledtr tag.
28 *
29 * <p>
30 * TODO: add proper support for labels. They are currently silently ignored.
31 *
32 * @version $Revision: 2986a8eeaebc $
33 */
34 public final class Mlabeledtr extends AbstractTableRow implements
35 MathMLLabeledRowElement {
36 /**
37 * The XML element from this class.
38 */
39 public static final String ELEMENT = "mlabeledtr";
40
41 private static final long serialVersionUID = 1L;
42
43 /**
44 * Default constructor. Sets MathML Namespace.
45 *
46 * @param qname
47 * Qualified name.
48 * @param odoc
49 * Owner Document.
50 */
51 public Mlabeledtr(final String qname, final AbstractDocument odoc) {
52 super(qname, odoc);
53 }
54
55 /** {@inheritDoc} */
56 @Override
57 protected Node newNode() {
58 return new Mlabeledtr(this.nodeName, this.ownerDocument);
59 }
60
61 /** {@inheritDoc} */
62 public MathMLElement getLabel() {
63 return this.getMathElement(0);
64 }
65
66 /** {@inheritDoc} */
67 public void setLabel(final MathMLElement label) {
68 this.setMathElement(0, label);
69 }
70
71 }