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: Munderover.java,v bc1d5fde7b73 2009/06/01 14:40:54 maxberger $ */
18
19 package net.sourceforge.jeuclid.elements.presentation.script;
20
21 import net.sourceforge.jeuclid.elements.JEuclidElement;
22
23 import org.apache.batik.dom.AbstractDocument;
24 import org.w3c.dom.Node;
25 import org.w3c.dom.mathml.MathMLElement;
26
27 /**
28 * This class arranges an element under, and an other element over an element.
29 *
30 * @version $Revision: bc1d5fde7b73 $
31 */
32 public final class Munderover extends AbstractUnderOver {
33
34 /**
35 * The XML element from this class.
36 */
37 public static final String ELEMENT = "munderover";
38
39 private static final long serialVersionUID = 1L;
40
41 /**
42 * Default constructor. Sets MathML Namespace.
43 *
44 * @param qname
45 * Qualified name.
46 * @param odoc
47 * Owner Document.
48 */
49 public Munderover(final String qname, final AbstractDocument odoc) {
50 super(qname, odoc);
51 }
52
53 /** {@inheritDoc} */
54 @Override
55 protected Node newNode() {
56 return new Munderover(this.nodeName, this.ownerDocument);
57 }
58
59 /** {@inheritDoc} */
60 @Override
61 public JEuclidElement getOverscript() {
62 return this.getMathElement(2);
63 }
64
65 /** {@inheritDoc} */
66 @Override
67 public JEuclidElement getUnderscript() {
68 return this.getMathElement(1);
69 }
70
71 /** {@inheritDoc} */
72 public void setOverscript(final MathMLElement overscript) {
73 this.setMathElement(2, overscript);
74 }
75
76 /** {@inheritDoc} */
77 public void setUnderscript(final MathMLElement underscript) {
78 this.setMathElement(1, underscript);
79 }
80
81 }