001: /*
002: * Copyright (c) 2000 World Wide Web Consortium,
003: * (Massachusetts Institute of Technology, Institut National de
004: * Recherche en Informatique et en Automatique, Keio University). All
005: * Rights Reserved. This program is distributed under the W3C's Software
006: * Intellectual Property License. This program is distributed in the
007: * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
008: * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
009: * PURPOSE. See W3C License http://www.w3.org/Consortium/Legal/ for more
010: * details.
011: */
012:
013: package org.w3c.dom.html;
014:
015: import org.w3c.dom.DOMException;
016:
017: /**
018: * A row in a table. See the TR element definition in HTML 4.0.
019: * <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>.
020: */
021: public interface HTMLTableRowElement extends HTMLElement {
022: /**
023: * The index of this row, relative to the entire table, starting from 0.
024: * This is in document tree order and not display order. The
025: * <code>rowIndex</code> does not take into account sections (
026: * <code>THEAD</code> , <code>TFOOT</code> , or <code>TBODY</code> )
027: * within the table.
028: */
029: public int getRowIndex();
030:
031: /**
032: * The index of this row, relative to the current section (
033: * <code>THEAD</code> , <code>TFOOT</code> , or <code>TBODY</code> ),
034: * starting from 0.
035: */
036: public int getSectionRowIndex();
037:
038: /**
039: * The collection of cells in this row.
040: */
041: public HTMLCollection getCells();
042:
043: /**
044: * Horizontal alignment of data within cells of this row. See the align
045: * attribute definition in HTML 4.0.
046: */
047: public String getAlign();
048:
049: public void setAlign(String align);
050:
051: /**
052: * Background color for rows. See the bgcolor attribute definition in
053: * HTML 4.0. This attribute is deprecated in HTML 4.0.
054: */
055: public String getBgColor();
056:
057: public void setBgColor(String bgColor);
058:
059: /**
060: * Alignment character for cells in a column. See the char attribute
061: * definition in HTML 4.0.
062: */
063: public String getCh();
064:
065: public void setCh(String ch);
066:
067: /**
068: * Offset of alignment character. See the charoff attribute definition
069: * in HTML 4.0.
070: */
071: public String getChOff();
072:
073: public void setChOff(String chOff);
074:
075: /**
076: * Vertical alignment of data within cells of this row. See the valign
077: * attribute definition in HTML 4.0.
078: */
079: public String getVAlign();
080:
081: public void setVAlign(String vAlign);
082:
083: /**
084: * Insert an empty <code>TD</code> cell into this row. If
085: * <code>index</code> is equal to the number of cells, the new cell is
086: * appended
087: * @param index The place to insert the cell, starting from 0.
088: * @return The newly created cell.
089: * @exception DOMException
090: * INDEX_SIZE_ERR: Raised if the specified <code>index</code> is
091: * greater than the number of cells or if the index is negative.
092: */
093: public HTMLElement insertCell(int index) throws DOMException;
094:
095: /**
096: * Delete a cell from the current row.
097: * @param index The index of the cell to delete, starting from 0.
098: * @exception DOMException
099: * INDEX_SIZE_ERR: Raised if the specified <code>index</code> is
100: * greater than or equal to the number of cells or if the index is
101: * negative.
102: */
103: public void deleteCell(int index) throws DOMException;
104:
105: }
|