1/*
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3 *
4 * This code is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 2 only, as
6 * published by the Free Software Foundation.  Oracle designates this
7 * particular file as subject to the "Classpath" exception as provided
8 * by Oracle in the LICENSE file that accompanied this code.
9 *
10 * This code is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
13 * version 2 for more details (a copy is included in the LICENSE file that
14 * accompanied this code).
15 *
16 * You should have received a copy of the GNU General Public License version
17 * 2 along with this work; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
23 */
24
25/*
26 * This file is available under and governed by the GNU General Public
27 * License version 2 only, as published by the Free Software Foundation.
28 * However, the following notice accompanied the original version of this
29 * file and, per its terms, should not be removed:
30 *
31 * Copyright (c) 2000 World Wide Web Consortium,
32 * (Massachusetts Institute of Technology, Institut National de
33 * Recherche en Informatique et en Automatique, Keio University). All
34 * Rights Reserved. This program is distributed under the W3C's Software
35 * Intellectual Property License. This program is distributed in the
36 * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
37 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
38 * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
39 * details.
40 */
41
42package org.w3c.dom.html;
43
44import org.w3c.dom.DOMException;
45
46/**
47 *  A row in a table. See the  TR element definition in HTML 4.0.
48 * <p>See also the <a href='http://www.w3.org/TR/2000/CR-DOM-Level-2-20000510'>Document Object Model (DOM) Level 2 Specification</a>.
49 *
50 * @since 1.4, DOM Level 2
51 */
52public interface HTMLTableRowElement extends HTMLElement {
53    /**
54     *  The index of this row, relative to the entire table, starting from 0.
55     * This is in document tree order and not display order. The
56     * <code>rowIndex</code> does not take into account sections (
57     * <code>THEAD</code> , <code>TFOOT</code> , or <code>TBODY</code> )
58     * within the table.
59     */
60    public int getRowIndex();
61
62    /**
63     *  The index of this row, relative to the current section (
64     * <code>THEAD</code> , <code>TFOOT</code> , or <code>TBODY</code> ),
65     * starting from 0.
66     */
67    public int getSectionRowIndex();
68
69    /**
70     *  The collection of cells in this row.
71     */
72    public HTMLCollection getCells();
73
74    /**
75     *  Horizontal alignment of data within cells of this row. See the  align
76     * attribute definition in HTML 4.0.
77     */
78    public String getAlign();
79    public void setAlign(String align);
80
81    /**
82     *  Background color for rows. See the  bgcolor attribute definition in
83     * HTML 4.0. This attribute is deprecated in HTML 4.0.
84     */
85    public String getBgColor();
86    public void setBgColor(String bgColor);
87
88    /**
89     *  Alignment character for cells in a column. See the  char attribute
90     * definition in HTML 4.0.
91     */
92    public String getCh();
93    public void setCh(String ch);
94
95    /**
96     *  Offset of alignment character. See the  charoff attribute definition
97     * in HTML 4.0.
98     */
99    public String getChOff();
100    public void setChOff(String chOff);
101
102    /**
103     *  Vertical alignment of data within cells of this row. See the  valign
104     * attribute definition in HTML 4.0.
105     */
106    public String getVAlign();
107    public void setVAlign(String vAlign);
108
109    /**
110     *  Insert an empty <code>TD</code> cell into this row. If
111     * <code>index</code> is equal to the number of cells, the new cell is
112     * appended
113     * @param index  The place to insert the cell, starting from 0.
114     * @return  The newly created cell.
115     * @exception DOMException
116     *    INDEX_SIZE_ERR: Raised if the specified <code>index</code> is
117     *   greater than the number of cells or if the index is negative.
118     */
119    public HTMLElement insertCell(int index)
120                                  throws DOMException;
121
122    /**
123     *  Delete a cell from the current row.
124     * @param index  The index of the cell to delete, starting from 0.
125     * @exception DOMException
126     *    INDEX_SIZE_ERR: Raised if the specified <code>index</code> is
127     *   greater than or equal to the number of cells or if the index is
128     *   negative.
129     */
130    public void deleteCell(int index)
131                           throws DOMException;
132
133}
134