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: AbstractTableElement.java,v bc1d5fde7b73 2009/06/01 14:40:54 maxberger $ */ 018 019 package net.sourceforge.jeuclid.elements.presentation.table; 020 021 import net.sourceforge.jeuclid.elements.presentation.AbstractContainer; 022 023 import org.apache.batik.dom.AbstractDocument; 024 025 /** 026 * Common functionality for all Table elements. This class contains support for 027 * setting and getting alignment attributes. 028 * 029 * @version $Revision: bc1d5fde7b73 $ 030 */ 031 public abstract class AbstractTableElement extends AbstractContainer { 032 /** 033 * Default constructor. Sets MathML Namespace. 034 * 035 * @param qname 036 * Qualified name. 037 * @param odoc 038 * Owner Document. 039 */ 040 public AbstractTableElement(final String qname, final AbstractDocument odoc) { 041 super(qname, odoc); 042 } 043 044 /** 045 * Gets row alignment. 046 * 047 * @return Alignment of the row. 048 */ 049 public String getRowalign() { 050 return this.getMathAttribute(Mtable.ATTR_ROWALIGN); 051 } 052 053 /** 054 * Sets row alignment. 055 * 056 * @param rowalign 057 * Value of row alignment. 058 */ 059 public void setRowalign(final String rowalign) { 060 this.setAttribute(Mtable.ATTR_ROWALIGN, rowalign); 061 } 062 063 /** 064 * Gets alignment for group in column. (not implemented yet). 065 * 066 * @return Alignment for group in column. 067 */ 068 public String getColumnalign() { 069 return this.getMathAttribute(Mtable.ATTR_COLUMNALIGN); 070 } 071 072 /** 073 * Sets alignment for group in column. (not implemented yet). 074 * 075 * @param columnalign 076 * Alignment for group in column. 077 */ 078 public void setColumnalign(final String columnalign) { 079 this.setAttribute(Mtable.ATTR_COLUMNALIGN, columnalign); 080 } 081 082 /** 083 * Gets alignment of the group for the row. (not implemented yet). 084 * 085 * @return Alignment of the row. 086 */ 087 public String getGroupalign() { 088 return this.getMathAttribute(Mtable.ATTR_GROUPALIGN); 089 } 090 091 /** 092 * Sets alignment of the group for the row. (not implemented yet). 093 * 094 * @param groupalign 095 * Alignment. 096 */ 097 public void setGroupalign(final String groupalign) { 098 this.setAttribute(Mtable.ATTR_GROUPALIGN, groupalign); 099 } 100 101 }