001/* 002 * Copyright (c) 2003 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. 010 * See W3C License http://www.w3.org/Consortium/Legal/ for more details. 011 */ 012 013package org.w3c.dom.html2; 014 015import org.w3c.dom.DOMException; 016 017/** 018 * A row in a table. See the TR element definition in HTML 4.01. 019 * <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>. 020 */ 021public interface HTMLTableRowElement extends HTMLElement { 022 /** 023 * This is in logical order and not in document order. The 024 * <code>rowIndex</code> does take into account sections ( 025 * <code>THEAD</code>, <code>TFOOT</code>, or <code>TBODY</code>) within 026 * the table, placing <code>THEAD</code> rows first in the index, 027 * followed by <code>TBODY</code> rows, followed by <code>TFOOT</code> 028 * rows. 029 * @version DOM Level 2 030 */ 031 public int getRowIndex(); 032 033 /** 034 * The index of this row, relative to the current section ( 035 * <code>THEAD</code>, <code>TFOOT</code>, or <code>TBODY</code>), 036 * starting from 0. 037 * @version DOM Level 2 038 */ 039 public int getSectionRowIndex(); 040 041 /** 042 * The collection of cells in this row. 043 * @version DOM Level 2 044 */ 045 public HTMLCollection getCells(); 046 047 /** 048 * Horizontal alignment of data within cells of this row. See the align 049 * attribute definition in HTML 4.01. 050 */ 051 public String getAlign(); 052 /** 053 * Horizontal alignment of data within cells of this row. See the align 054 * attribute definition in HTML 4.01. 055 */ 056 public void setAlign(String align); 057 058 /** 059 * Background color for rows. See the bgcolor attribute definition in HTML 060 * 4.01. This attribute is deprecated in HTML 4.01. 061 */ 062 public String getBgColor(); 063 /** 064 * Background color for rows. See the bgcolor attribute definition in HTML 065 * 4.01. This attribute is deprecated in HTML 4.01. 066 */ 067 public void setBgColor(String bgColor); 068 069 /** 070 * Alignment character for cells in a column. See the char attribute 071 * definition in HTML 4.01. 072 */ 073 public String getCh(); 074 /** 075 * Alignment character for cells in a column. See the char attribute 076 * definition in HTML 4.01. 077 */ 078 public void setCh(String ch); 079 080 /** 081 * Offset of alignment character. See the charoff attribute definition in 082 * HTML 4.01. 083 */ 084 public String getChOff(); 085 /** 086 * Offset of alignment character. See the charoff attribute definition in 087 * HTML 4.01. 088 */ 089 public void setChOff(String chOff); 090 091 /** 092 * Vertical alignment of data within cells of this row. See the valign 093 * attribute definition in HTML 4.01. 094 */ 095 public String getVAlign(); 096 /** 097 * Vertical alignment of data within cells of this row. See the valign 098 * attribute definition in HTML 4.01. 099 */ 100 public void setVAlign(String vAlign); 101 102 /** 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 105 * cell is appended. 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 111 * than -1. 112 * @version DOM Level 2 113 */ 114 public HTMLElement insertCell(int index) 115 throws DOMException; 116 117 /** 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 126 */ 127 public void deleteCell(int index) 128 throws DOMException; 129 130}