2
* Copyright (c) 1998 World Wide Web Consortium, (Massachusetts Institute of
3
* Technology, Institut National de Recherche en Informatique et en
4
* Automatique, Keio University).
5
* All Rights Reserved. http://www.w3.org/Consortium/Legal/
8
package org.w3c.dom.html;
13
* The create* and delete* methods on the table allow authors to constructand
14
* modify tables. HTML 4.0 specifies that only one of each of the
15
* <code>CAPTION</code>, <code>THEAD</code>, and <code>TFOOT</code>elements
16
* may exist in a table. Therefore, if one exists, and thecreateTHead() or
17
* createTFoot() method is called, the method returnsthe existing THead or
18
* TFoot element. See the TABLE element definition in HTML 4.0.
20
public interface HTMLTableElement extends HTMLElement {
22
* Returns the table's <code>CAPTION</code>, or void if none exists.
24
public HTMLTableCaptionElement getCaption();
25
public void setCaption(HTMLTableCaptionElement caption);
27
* Returns the table's <code>THEAD</code>, or <code>null</code> if none
30
public HTMLTableSectionElement getTHead();
31
public void setTHead(HTMLTableSectionElement tHead);
33
* Returns the table's <code>TFOOT</code>, or <code>null</code> if none
36
public HTMLTableSectionElement getTFoot();
37
public void setTFoot(HTMLTableSectionElement tFoot);
39
* Returns a collection of all the rows in the table, including all in
40
* <code>THEAD</code>, <code>TFOOT</code>, all <code>TBODY</code> elements.
42
public HTMLCollection getRows();
44
* Returns a collection of the defined table bodies.
46
public HTMLCollection getTBodies();
48
* Specifies the table's position with respect to the rest of the document.
49
* See the align attribute definition in HTML 4.0. This attribute is
50
* deprecated in HTML 4.0.
52
public String getAlign();
53
public void setAlign(String align);
55
* Cell background color. See the bgcolor attribute definition in HTML 4.0.
56
* This attribute is deprecated in HTML 4.0.
58
public String getBgColor();
59
public void setBgColor(String bgColor);
61
* The width of the border around the table. See the border attribute
62
* definition in HTML 4.0.
64
public String getBorder();
65
public void setBorder(String border);
67
* Specifies the horizontal and vertical space between cell content andcell
68
* borders. See the cellpadding attribute definition in HTML 4.0.
70
public String getCellPadding();
71
public void setCellPadding(String cellPadding);
73
* Specifies the horizontal and vertical separation between cells. See the
74
* cellspacing attribute definition in HTML 4.0.
76
public String getCellSpacing();
77
public void setCellSpacing(String cellSpacing);
79
* Specifies which external table borders to render. See the frame attribute
80
* definition in HTML 4.0.
82
public String getFrame();
83
public void setFrame(String frame);
85
* Specifies which internal table borders to render. See the rules attribute
86
* definition in HTML 4.0.
88
public String getRules();
89
public void setRules(String rules);
91
* Supplementary description about the purpose or structureof a table. See
92
* the summary attribute definition in HTML 4.0.
94
public String getSummary();
95
public void setSummary(String summary);
97
* Specifies the desired table width. See the width attribute definition in
100
public String getWidth();
101
public void setWidth(String width);
103
* Create a table header row or return an existing one.
104
* @return A new table header element (<code>THEAD</code>).
106
public HTMLElement createTHead();
108
* Delete the header from the table, if one exists.
110
public void deleteTHead();
112
* Create a table footer row or return an existing one.
113
* @return A footer element (<code>TFOOT</code>).
115
public HTMLElement createTFoot();
117
* Delete the footer from the table, if one exists.
119
public void deleteTFoot();
121
* Create a new table caption object or return an existing one.
122
* @return A <code>CAPTION</code> element.
124
public HTMLElement createCaption();
126
* Delete the table caption, if one exists.
128
public void deleteCaption();
130
* Insert a new empty row in the table.Note. A table row cannot be empty
131
* according to HTML 4.0 Recommendation.
132
* @param index The row number where to insert a new row.
133
* @return The newly created row.
135
public HTMLElement insertRow(int index);
137
* Delete a table row.
138
* @param index The index of the row to be deleted.
140
public void deleteRow(int index);