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: AbstractTableElement.java,v bc1d5fde7b73 2009/06/01 14:40:54 maxberger $ */
18
19 package net.sourceforge.jeuclid.elements.presentation.table;
20
21 import net.sourceforge.jeuclid.elements.presentation.AbstractContainer;
22
23 import org.apache.batik.dom.AbstractDocument;
24
25 /**
26 * Common functionality for all Table elements. This class contains support for
27 * setting and getting alignment attributes.
28 *
29 * @version $Revision: bc1d5fde7b73 $
30 */
31 public abstract class AbstractTableElement extends AbstractContainer {
32 /**
33 * Default constructor. Sets MathML Namespace.
34 *
35 * @param qname
36 * Qualified name.
37 * @param odoc
38 * Owner Document.
39 */
40 public AbstractTableElement(final String qname, final AbstractDocument odoc) {
41 super(qname, odoc);
42 }
43
44 /**
45 * Gets row alignment.
46 *
47 * @return Alignment of the row.
48 */
49 public String getRowalign() {
50 return this.getMathAttribute(Mtable.ATTR_ROWALIGN);
51 }
52
53 /**
54 * Sets row alignment.
55 *
56 * @param rowalign
57 * Value of row alignment.
58 */
59 public void setRowalign(final String rowalign) {
60 this.setAttribute(Mtable.ATTR_ROWALIGN, rowalign);
61 }
62
63 /**
64 * Gets alignment for group in column. (not implemented yet).
65 *
66 * @return Alignment for group in column.
67 */
68 public String getColumnalign() {
69 return this.getMathAttribute(Mtable.ATTR_COLUMNALIGN);
70 }
71
72 /**
73 * Sets alignment for group in column. (not implemented yet).
74 *
75 * @param columnalign
76 * Alignment for group in column.
77 */
78 public void setColumnalign(final String columnalign) {
79 this.setAttribute(Mtable.ATTR_COLUMNALIGN, columnalign);
80 }
81
82 /**
83 * Gets alignment of the group for the row. (not implemented yet).
84 *
85 * @return Alignment of the row.
86 */
87 public String getGroupalign() {
88 return this.getMathAttribute(Mtable.ATTR_GROUPALIGN);
89 }
90
91 /**
92 * Sets alignment of the group for the row. (not implemented yet).
93 *
94 * @param groupalign
95 * Alignment.
96 */
97 public void setGroupalign(final String groupalign) {
98 this.setAttribute(Mtable.ATTR_GROUPALIGN, groupalign);
99 }
100
101 }