1. /*
  2. * Copyright (c) 2000 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. See W3C License http://www.w3.org/Consortium/Legal/ for more
  10. * details.
  11. */
  12. package org.w3c.dom.html;
  13. import org.w3c.dom.DOMException;
  14. /**
  15. * A row in a table. See the TR element definition in HTML 4.0.
  16. * <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>.
  17. */
  18. public interface HTMLTableRowElement extends HTMLElement {
  19. /**
  20. * The index of this row, relative to the entire table, starting from 0.
  21. * This is in document tree order and not display order. The
  22. * <code>rowIndex</code> does not take into account sections (
  23. * <code>THEAD</code> , <code>TFOOT</code> , or <code>TBODY</code> )
  24. * within the table.
  25. */
  26. public int getRowIndex();
  27. /**
  28. * The index of this row, relative to the current section (
  29. * <code>THEAD</code> , <code>TFOOT</code> , or <code>TBODY</code> ),
  30. * starting from 0.
  31. */
  32. public int getSectionRowIndex();
  33. /**
  34. * The collection of cells in this row.
  35. */
  36. public HTMLCollection getCells();
  37. /**
  38. * Horizontal alignment of data within cells of this row. See the align
  39. * attribute definition in HTML 4.0.
  40. */
  41. public String getAlign();
  42. public void setAlign(String align);
  43. /**
  44. * Background color for rows. See the bgcolor attribute definition in
  45. * HTML 4.0. This attribute is deprecated in HTML 4.0.
  46. */
  47. public String getBgColor();
  48. public void setBgColor(String bgColor);
  49. /**
  50. * Alignment character for cells in a column. See the char attribute
  51. * definition in HTML 4.0.
  52. */
  53. public String getCh();
  54. public void setCh(String ch);
  55. /**
  56. * Offset of alignment character. See the charoff attribute definition
  57. * in HTML 4.0.
  58. */
  59. public String getChOff();
  60. public void setChOff(String chOff);
  61. /**
  62. * Vertical alignment of data within cells of this row. See the valign
  63. * attribute definition in HTML 4.0.
  64. */
  65. public String getVAlign();
  66. public void setVAlign(String vAlign);
  67. /**
  68. * Insert an empty <code>TD</code> cell into this row. If
  69. * <code>index</code> is equal to the number of cells, the new cell is
  70. * appended
  71. * @param index The place to insert the cell, starting from 0.
  72. * @return The newly created cell.
  73. * @exception DOMException
  74. * INDEX_SIZE_ERR: Raised if the specified <code>index</code> is
  75. * greater than the number of cells or if the index is negative.
  76. */
  77. public HTMLElement insertCell(int index)
  78. throws DOMException;
  79. /**
  80. * Delete a cell from the current row.
  81. * @param index The index of the cell to delete, starting from 0.
  82. * @exception DOMException
  83. * INDEX_SIZE_ERR: Raised if the specified <code>index</code> is
  84. * greater than or equal to the number of cells or if the index is
  85. * negative.
  86. */
  87. public void deleteCell(int index)
  88. throws DOMException;
  89. }