Dead
[official-gcc.git] / gomp-20050608-branch / libjava / classpath / external / w3c_dom / org / w3c / dom / html2 / HTMLTableElement.java
blobd36b19cfa787b7c2a51be6270615ecd7fb5e4b3e
1 /*
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
9 * PURPOSE.
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;
17 /**
18 * The create* and delete* methods on the table allow authors to construct and
19 * modify tables. [<a href='http://www.w3.org/TR/1999/REC-html401-19991224'>HTML 4.01</a>] specifies that only one of each of the
20 * <code>CAPTION</code>, <code>THEAD</code>, and <code>TFOOT</code> elements
21 * may exist in a table. Therefore, if one exists, and the createTHead() or
22 * createTFoot() method is called, the method returns the existing THead or
23 * TFoot element. See the TABLE element definition in HTML 4.01.
24 * <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>.
26 public interface HTMLTableElement extends HTMLElement {
27 /**
28 * Returns the table's <code>CAPTION</code>, or void if none exists.
29 * @version DOM Level 2
31 public HTMLTableCaptionElement getCaption();
32 /**
33 * Returns the table's <code>CAPTION</code>, or void if none exists.
34 * @exception DOMException
35 * HIERARCHY_REQUEST_ERR: if the element is not a <code>CAPTION</code>.
36 * @version DOM Level 2
38 public void setCaption(HTMLTableCaptionElement caption)
39 throws DOMException;
41 /**
42 * Returns the table's <code>THEAD</code>, or <code>null</code> if none
43 * exists.
44 * @version DOM Level 2
46 public HTMLTableSectionElement getTHead();
47 /**
48 * Returns the table's <code>THEAD</code>, or <code>null</code> if none
49 * exists.
50 * @exception DOMException
51 * HIERARCHY_REQUEST_ERR: if the element is not a <code>THEAD</code>.
52 * @version DOM Level 2
54 public void setTHead(HTMLTableSectionElement tHead)
55 throws DOMException;
57 /**
58 * Returns the table's <code>TFOOT</code>, or <code>null</code> if none
59 * exists.
60 * @version DOM Level 2
62 public HTMLTableSectionElement getTFoot();
63 /**
64 * Returns the table's <code>TFOOT</code>, or <code>null</code> if none
65 * exists.
66 * @exception DOMException
67 * HIERARCHY_REQUEST_ERR: if the element is not a <code>TFOOT</code>.
68 * @version DOM Level 2
70 public void setTFoot(HTMLTableSectionElement tFoot)
71 throws DOMException;
73 /**
74 * Returns a collection of all the rows in the table, including all in
75 * <code>THEAD</code>, <code>TFOOT</code>, all <code>TBODY</code>
76 * elements.
78 public HTMLCollection getRows();
80 /**
81 * Returns a collection of the table bodies (including implicit ones).
83 public HTMLCollection getTBodies();
85 /**
86 * Specifies the table's position with respect to the rest of the
87 * document. See the align attribute definition in HTML 4.01. This
88 * attribute is deprecated in HTML 4.01.
90 public String getAlign();
91 /**
92 * Specifies the table's position with respect to the rest of the
93 * document. See the align attribute definition in HTML 4.01. This
94 * attribute is deprecated in HTML 4.01.
96 public void setAlign(String align);
98 /**
99 * Cell background color. See the bgcolor attribute definition in HTML
100 * 4.01. This attribute is deprecated in HTML 4.01.
102 public String getBgColor();
104 * Cell background color. See the bgcolor attribute definition in HTML
105 * 4.01. This attribute is deprecated in HTML 4.01.
107 public void setBgColor(String bgColor);
110 * The width of the border around the table. See the border attribute
111 * definition in HTML 4.01.
113 public String getBorder();
115 * The width of the border around the table. See the border attribute
116 * definition in HTML 4.01.
118 public void setBorder(String border);
121 * Specifies the horizontal and vertical space between cell content and
122 * cell borders. See the cellpadding attribute definition in HTML 4.01.
124 public String getCellPadding();
126 * Specifies the horizontal and vertical space between cell content and
127 * cell borders. See the cellpadding attribute definition in HTML 4.01.
129 public void setCellPadding(String cellPadding);
132 * Specifies the horizontal and vertical separation between cells. See the
133 * cellspacing attribute definition in HTML 4.01.
135 public String getCellSpacing();
137 * Specifies the horizontal and vertical separation between cells. See the
138 * cellspacing attribute definition in HTML 4.01.
140 public void setCellSpacing(String cellSpacing);
143 * Specifies which external table borders to render. See the frame
144 * attribute definition in HTML 4.01.
146 public String getFrame();
148 * Specifies which external table borders to render. See the frame
149 * attribute definition in HTML 4.01.
151 public void setFrame(String frame);
154 * Specifies which internal table borders to render. See the rules
155 * attribute definition in HTML 4.01.
157 public String getRules();
159 * Specifies which internal table borders to render. See the rules
160 * attribute definition in HTML 4.01.
162 public void setRules(String rules);
165 * Description about the purpose or structure of a table. See the summary
166 * attribute definition in HTML 4.01.
168 public String getSummary();
170 * Description about the purpose or structure of a table. See the summary
171 * attribute definition in HTML 4.01.
173 public void setSummary(String summary);
176 * Specifies the desired table width. See the width attribute definition
177 * in HTML 4.01.
179 public String getWidth();
181 * Specifies the desired table width. See the width attribute definition
182 * in HTML 4.01.
184 public void setWidth(String width);
187 * Create a table header row or return an existing one.
188 * @return A new table header element (<code>THEAD</code>).
190 public HTMLElement createTHead();
193 * Delete the header from the table, if one exists.
195 public void deleteTHead();
198 * Create a table footer row or return an existing one.
199 * @return A footer element (<code>TFOOT</code>).
201 public HTMLElement createTFoot();
204 * Delete the footer from the table, if one exists.
206 public void deleteTFoot();
209 * Create a new table caption object or return an existing one.
210 * @return A <code>CAPTION</code> element.
212 public HTMLElement createCaption();
215 * Delete the table caption, if one exists.
217 public void deleteCaption();
220 * Insert a new empty row in the table. The new row is inserted
221 * immediately before and in the same section as the current
222 * <code>index</code>th row in the table. If <code>index</code> is -1 or
223 * equal to the number of rows, the new row is appended. In addition,
224 * when the table is empty the row is inserted into a <code>TBODY</code>
225 * which is created and inserted into the table.A table row cannot be
226 * empty according to [<a href='http://www.w3.org/TR/1999/REC-html401-19991224'>HTML 4.01</a>].
227 * @param index The row number where to insert a new row. This index
228 * starts from 0 and is relative to the logical order (not document
229 * order) of all the rows contained inside the table.
230 * @return The newly created row.
231 * @exception DOMException
232 * INDEX_SIZE_ERR: Raised if the specified index is greater than the
233 * number of rows or if the index is a negative number other than -1.
234 * @version DOM Level 2
236 public HTMLElement insertRow(int index)
237 throws DOMException;
240 * Delete a table row.
241 * @param index The index of the row to be deleted. This index starts
242 * from 0 and is relative to the logical order (not document order) of
243 * all the rows contained inside the table. If the index is -1 the
244 * last row in the table is deleted.
245 * @exception DOMException
246 * INDEX_SIZE_ERR: Raised if the specified index is greater than or
247 * equal to the number of rows or if the index is a negative number
248 * other than -1.
249 * @version DOM Level 2
251 public void deleteRow(int index)
252 throws DOMException;