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: Mphantom.java,v bc1d5fde7b73 2009/06/01 14:40:54 maxberger $ */
018    
019    package net.sourceforge.jeuclid.elements.presentation.general;
020    
021    import java.util.Collections;
022    import java.util.List;
023    
024    import net.sourceforge.jeuclid.elements.presentation.AbstractContainer;
025    import net.sourceforge.jeuclid.layout.LayoutableNode;
026    
027    import org.apache.batik.dom.AbstractDocument;
028    import org.w3c.dom.Node;
029    
030    /**
031     * This class represents a phantom of a math element. This is used as spacer.
032     * 
033     * @version $Revision: bc1d5fde7b73 $
034     */
035    public final class Mphantom extends AbstractContainer {
036    
037        /**
038         * The XML element from this class.
039         */
040        public static final String ELEMENT = "mphantom";
041    
042        private static final long serialVersionUID = 1L;
043    
044        /**
045         * Default constructor. Sets MathML Namespace.
046         * 
047         * @param qname
048         *            Qualified name.
049         * @param odoc
050         *            Owner Document.
051         */
052        public Mphantom(final String qname, final AbstractDocument odoc) {
053            super(qname, odoc);
054        }
055    
056        /** {@inheritDoc} */
057        @Override
058        protected Node newNode() {
059            return new Mphantom(this.nodeName, this.ownerDocument);
060        }
061    
062        /** {@inheritDoc} */
063        @Override
064        public List<LayoutableNode> getChildrenToDraw() {
065            return Collections.emptyList();
066        }
067    }