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
013 package org.w3c.dom.html2;
014
015 import org.w3c.dom.DOMException;
016
017 /**
018 * The <code>THEAD</code>, <code>TFOOT</code>, and <code>TBODY</code>
019 * elements.
020 * <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>.
021 */
022 public interface HTMLTableSectionElement extends HTMLElement {
023 /**
024 * Horizontal alignment of data in cells. See the <code>align</code>
025 * attribute for HTMLTheadElement for details.
026 */
027 public String getAlign();
028 /**
029 * Horizontal alignment of data in cells. See the <code>align</code>
030 * attribute for HTMLTheadElement for details.
031 */
032 public void setAlign(String align);
033
034 /**
035 * Alignment character for cells in a column. See the char attribute
036 * definition in HTML 4.01.
037 */
038 public String getCh();
039 /**
040 * Alignment character for cells in a column. See the char attribute
041 * definition in HTML 4.01.
042 */
043 public void setCh(String ch);
044
045 /**
046 * Offset of alignment character. See the charoff attribute definition in
047 * HTML 4.01.
048 */
049 public String getChOff();
050 /**
051 * Offset of alignment character. See the charoff attribute definition in
052 * HTML 4.01.
053 */
054 public void setChOff(String chOff);
055
056 /**
057 * Vertical alignment of data in cells. See the <code>valign</code>
058 * attribute for HTMLTheadElement for details.
059 */
060 public String getVAlign();
061 /**
062 * Vertical alignment of data in cells. See the <code>valign</code>
063 * attribute for HTMLTheadElement for details.
064 */
065 public void setVAlign(String vAlign);
066
067 /**
068 * The collection of rows in this table section.
069 */
070 public HTMLCollection getRows();
071
072 /**
073 * Insert a row into this section. The new row is inserted immediately
074 * before the current <code>index</code>th row in this section. If
075 * <code>index</code> is -1 or equal to the number of rows in this
076 * section, the new row is appended.
077 * @param index The row number where to insert a new row. This index
078 * starts from 0 and is relative only to the rows contained inside
079 * this section, not all the rows in the table.
080 * @return The newly created row.
081 * @exception DOMException
082 * INDEX_SIZE_ERR: Raised if the specified index is greater than the
083 * number of rows of if the index is a negative number other than -1.
084 * @version DOM Level 2
085 */
086 public HTMLElement insertRow(int index)
087 throws DOMException;
088
089 /**
090 * Delete a row from this section.
091 * @param index The index of the row to be deleted, or -1 to delete the
092 * last row. This index starts from 0 and is relative only to the rows
093 * contained inside this section, not all the rows in the table.
094 * @exception DOMException
095 * INDEX_SIZE_ERR: Raised if the specified index is greater than or
096 * equal to the number of rows or if the index is a negative number
097 * other than -1.
098 * @version DOM Level 2
099 */
100 public void deleteRow(int index)
101 throws DOMException;
102
103 }