2 * Copyright (c) 2003 World Wide Web Consortium,
3 * (Massachusetts Institute of Technology, Institut National de
4 * Recherche en Informatique et en Automatique, Keio University). All
5 * Rights Reserved. This program is distributed under the W3C's Software
6 * Intellectual Property License. This program is distributed in the
7 * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
8 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10 * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
13 package org.w3c.dom.html2;
15 import org.w3c.dom.DOMException;
18 * A row in a table. See the TR element definition in HTML 4.01.
19 * <p>See also the <a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>Document Object Model (DOM) Level 2 HTML Specification</a>.
21 public interface HTMLTableRowElement extends HTMLElement {
23 * This is in logical order and not in document order. The
24 * <code>rowIndex</code> does take into account sections (
25 * <code>THEAD</code>, <code>TFOOT</code>, or <code>TBODY</code>) within
26 * the table, placing <code>THEAD</code> rows first in the index,
27 * followed by <code>TBODY</code> rows, followed by <code>TFOOT</code>
29 * @version DOM Level 2
31 public int getRowIndex();
34 * The index of this row, relative to the current section (
35 * <code>THEAD</code>, <code>TFOOT</code>, or <code>TBODY</code>),
37 * @version DOM Level 2
39 public int getSectionRowIndex();
42 * The collection of cells in this row.
43 * @version DOM Level 2
45 public HTMLCollection getCells();
48 * Horizontal alignment of data within cells of this row. See the align
49 * attribute definition in HTML 4.01.
51 public String getAlign();
53 * Horizontal alignment of data within cells of this row. See the align
54 * attribute definition in HTML 4.01.
56 public void setAlign(String align);
59 * Background color for rows. See the bgcolor attribute definition in HTML
60 * 4.01. This attribute is deprecated in HTML 4.01.
62 public String getBgColor();
64 * Background color for rows. See the bgcolor attribute definition in HTML
65 * 4.01. This attribute is deprecated in HTML 4.01.
67 public void setBgColor(String bgColor);
70 * Alignment character for cells in a column. See the char attribute
71 * definition in HTML 4.01.
73 public String getCh();
75 * Alignment character for cells in a column. See the char attribute
76 * definition in HTML 4.01.
78 public void setCh(String ch);
81 * Offset of alignment character. See the charoff attribute definition in
84 public String getChOff();
86 * Offset of alignment character. See the charoff attribute definition in
89 public void setChOff(String chOff);
92 * Vertical alignment of data within cells of this row. See the valign
93 * attribute definition in HTML 4.01.
95 public String getVAlign();
97 * Vertical alignment of data within cells of this row. See the valign
98 * attribute definition in HTML 4.01.
100 public void setVAlign(String vAlign);
103 * Insert an empty <code>TD</code> cell into this row. If
104 * <code>index</code> is -1 or equal to the number of cells, the new
106 * @param index The place to insert the cell, starting from 0.
107 * @return The newly created cell.
108 * @exception DOMException
109 * INDEX_SIZE_ERR: Raised if the specified <code>index</code> is greater
110 * than the number of cells or if the index is a negative number other
112 * @version DOM Level 2
114 public HTMLElement insertCell(int index)
118 * Delete a cell from the current row.
119 * @param index The index of the cell to delete, starting from 0. If the
120 * index is -1 the last cell in the row is deleted.
121 * @exception DOMException
122 * INDEX_SIZE_ERR: Raised if the specified <code>index</code> is greater
123 * than or equal to the number of cells or if the index is a negative
124 * number other than -1.
125 * @version DOM Level 2
127 public void deleteCell(int index)