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: Mlabeledtr.java,v 2986a8eeaebc 2009/09/24 12:53:08 max $ */ 018 019 package net.sourceforge.jeuclid.elements.presentation.table; 020 021 import org.apache.batik.dom.AbstractDocument; 022 import org.w3c.dom.Node; 023 import org.w3c.dom.mathml.MathMLElement; 024 import org.w3c.dom.mathml.MathMLLabeledRowElement; 025 026 /** 027 * This class represents the mlabeledtr tag. 028 * 029 * <p> 030 * TODO: add proper support for labels. They are currently silently ignored. 031 * 032 * @version $Revision: 2986a8eeaebc $ 033 */ 034 public final class Mlabeledtr extends AbstractTableRow implements 035 MathMLLabeledRowElement { 036 /** 037 * The XML element from this class. 038 */ 039 public static final String ELEMENT = "mlabeledtr"; 040 041 private static final long serialVersionUID = 1L; 042 043 /** 044 * Default constructor. Sets MathML Namespace. 045 * 046 * @param qname 047 * Qualified name. 048 * @param odoc 049 * Owner Document. 050 */ 051 public Mlabeledtr(final String qname, final AbstractDocument odoc) { 052 super(qname, odoc); 053 } 054 055 /** {@inheritDoc} */ 056 @Override 057 protected Node newNode() { 058 return new Mlabeledtr(this.nodeName, this.ownerDocument); 059 } 060 061 /** {@inheritDoc} */ 062 public MathMLElement getLabel() { 063 return this.getMathElement(0); 064 } 065 066 /** {@inheritDoc} */ 067 public void setLabel(final MathMLElement label) { 068 this.setMathElement(0, label); 069 } 070 071 }