001 /* 002 * Copyright 2002 - 2007 JEuclid, http://jeuclid.sf.net 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017 /* $Id: Munderover.java,v bc1d5fde7b73 2009/06/01 14:40:54 maxberger $ */ 018 019 package net.sourceforge.jeuclid.elements.presentation.script; 020 021 import net.sourceforge.jeuclid.elements.JEuclidElement; 022 023 import org.apache.batik.dom.AbstractDocument; 024 import org.w3c.dom.Node; 025 import org.w3c.dom.mathml.MathMLElement; 026 027 /** 028 * This class arranges an element under, and an other element over an element. 029 * 030 * @version $Revision: bc1d5fde7b73 $ 031 */ 032 public final class Munderover extends AbstractUnderOver { 033 034 /** 035 * The XML element from this class. 036 */ 037 public static final String ELEMENT = "munderover"; 038 039 private static final long serialVersionUID = 1L; 040 041 /** 042 * Default constructor. Sets MathML Namespace. 043 * 044 * @param qname 045 * Qualified name. 046 * @param odoc 047 * Owner Document. 048 */ 049 public Munderover(final String qname, final AbstractDocument odoc) { 050 super(qname, odoc); 051 } 052 053 /** {@inheritDoc} */ 054 @Override 055 protected Node newNode() { 056 return new Munderover(this.nodeName, this.ownerDocument); 057 } 058 059 /** {@inheritDoc} */ 060 @Override 061 public JEuclidElement getOverscript() { 062 return this.getMathElement(2); 063 } 064 065 /** {@inheritDoc} */ 066 @Override 067 public JEuclidElement getUnderscript() { 068 return this.getMathElement(1); 069 } 070 071 /** {@inheritDoc} */ 072 public void setOverscript(final MathMLElement overscript) { 073 this.setMathElement(2, overscript); 074 } 075 076 /** {@inheritDoc} */ 077 public void setUnderscript(final MathMLElement underscript) { 078 this.setMathElement(1, underscript); 079 } 080 081 }