| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| Mover |
|
| 1.1666666666666667;1,167 |
| 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: Mover.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.DOMException; | |
| 25 | import org.w3c.dom.Node; | |
| 26 | import org.w3c.dom.mathml.MathMLElement; | |
| 27 | ||
| 28 | /** | |
| 29 | * This class arranges a element over an other element. | |
| 30 | * | |
| 31 | * @version $Revision: bc1d5fde7b73 $ | |
| 32 | */ | |
| 33 | 0 | public final class Mover extends AbstractUnderOver { |
| 34 | ||
| 35 | /** | |
| 36 | * The XML element from this class. | |
| 37 | */ | |
| 38 | public static final String ELEMENT = "mover"; | |
| 39 | ||
| 40 | private static final long serialVersionUID = 1L; | |
| 41 | ||
| 42 | /** | |
| 43 | * Default constructor. Sets MathML Namespace. | |
| 44 | * | |
| 45 | * @param qname | |
| 46 | * Qualified name. | |
| 47 | * @param odoc | |
| 48 | * Owner Document. | |
| 49 | */ | |
| 50 | public Mover(final String qname, final AbstractDocument odoc) { | |
| 51 | 3971 | super(qname, odoc); |
| 52 | 3971 | } |
| 53 | ||
| 54 | /** {@inheritDoc} */ | |
| 55 | @Override | |
| 56 | protected Node newNode() { | |
| 57 | 0 | return new Mover(this.nodeName, this.ownerDocument); |
| 58 | } | |
| 59 | ||
| 60 | /** {@inheritDoc} */ | |
| 61 | @Override | |
| 62 | public JEuclidElement getOverscript() { | |
| 63 | 2508 | return this.getMathElement(1); |
| 64 | } | |
| 65 | ||
| 66 | /** {@inheritDoc} */ | |
| 67 | @Override | |
| 68 | public JEuclidElement getUnderscript() { | |
| 69 | 2508 | return null; |
| 70 | } | |
| 71 | ||
| 72 | /** {@inheritDoc} */ | |
| 73 | public void setOverscript(final MathMLElement overscript) { | |
| 74 | 0 | this.setMathElement(1, overscript); |
| 75 | 0 | } |
| 76 | ||
| 77 | /** {@inheritDoc} */ | |
| 78 | public void setUnderscript(final MathMLElement underscript) { | |
| 79 | 0 | throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, |
| 80 | "mover does not have underscript"); | |
| 81 | } | |
| 82 | ||
| 83 | } |