1. /*
  2. * @(#)AccessibleTable.java 1.9 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package javax.accessibility;
  8. /**
  9. * Class AccessibleTable describes a user-interface component that
  10. * presents data in a two-dimensional table format.
  11. *
  12. * @version 1.2 10/12/99
  13. * @author Lynn Monsanto
  14. */
  15. public interface AccessibleTable {
  16. /**
  17. * Returns the caption for the table.
  18. *
  19. * @return the caption for the table
  20. */
  21. public Accessible getAccessibleCaption();
  22. /**
  23. * Sets the caption for the table.
  24. *
  25. * @param a the caption for the table
  26. */
  27. public void setAccessibleCaption(Accessible a);
  28. /**
  29. * Returns the summary description of the table.
  30. *
  31. * @return the summary description of the table
  32. */
  33. public Accessible getAccessibleSummary();
  34. /**
  35. * Sets the summary description of the table
  36. *
  37. * @param a the summary description of the table
  38. */
  39. public void setAccessibleSummary(Accessible a);
  40. /**
  41. * Returns the number of rows in the table.
  42. *
  43. * @return the number of rows in the table
  44. */
  45. public int getAccessibleRowCount();
  46. /**
  47. * Returns the number of columns in the table.
  48. *
  49. * @return the number of columns in the table
  50. */
  51. public int getAccessibleColumnCount();
  52. /**
  53. * Returns the Accessible at a specified row and column
  54. * in the table.
  55. *
  56. * @param r zero-based row of the table
  57. * @param c zero-based column of the table
  58. * @return the Accessible at the specified row and column
  59. */
  60. public Accessible getAccessibleAt(int r, int c);
  61. /**
  62. * Returns the number of rows occupied by the Accessible at
  63. * a specified row and column in the table.
  64. *
  65. * @return the number of rows occupied by the Accessible at a
  66. * given specified (row, column)
  67. */
  68. public int getAccessibleRowExtentAt(int r, int c);
  69. /**
  70. * Returns the number of columns occupied by the Accessible at
  71. * a specified row and column in the table.
  72. *
  73. * @return the number of columns occupied by the Accessible at a
  74. * given specified row and column
  75. */
  76. public int getAccessibleColumnExtentAt(int r, int c);
  77. /**
  78. * Returns the row headers as an AccessibleTable.
  79. *
  80. * @return an AccessibleTable representing the row
  81. * headers
  82. */
  83. public AccessibleTable getAccessibleRowHeader();
  84. /**
  85. * Sets the row headers.
  86. *
  87. * @param table an AccessibleTable representing the
  88. * row headers
  89. */
  90. public void setAccessibleRowHeader(AccessibleTable table);
  91. /**
  92. * Returns the column headers as an AccessibleTable.
  93. *
  94. * @return an AccessibleTable representing the column
  95. * headers
  96. */
  97. public AccessibleTable getAccessibleColumnHeader();
  98. /**
  99. * Sets the column headers.
  100. *
  101. * @param table an AccessibleTable representing the
  102. * column headers
  103. */
  104. public void setAccessibleColumnHeader(AccessibleTable table);
  105. /**
  106. * Returns the description of the specified row in the table.
  107. *
  108. * @param r zero-based row of the table
  109. * @return the description of the row
  110. */
  111. public Accessible getAccessibleRowDescription(int r);
  112. /**
  113. * Sets the description text of the specified row of the table.
  114. *
  115. * @param r zero-based row of the table
  116. * @param a the description of the row
  117. */
  118. public void setAccessibleRowDescription(int r, Accessible a);
  119. /**
  120. * Returns the description text of the specified column in the table.
  121. *
  122. * @param c zero-based column of the table
  123. * @return the text description of the column
  124. */
  125. public Accessible getAccessibleColumnDescription(int c);
  126. /**
  127. * Sets the description text of the specified column in the table.
  128. *
  129. * @param c zero-based column of the table
  130. * @param a the text description of the column
  131. */
  132. public void setAccessibleColumnDescription(int c, Accessible a);
  133. /**
  134. * Returns a boolean value indicating whether the accessible at
  135. * a specified row and column is selected.
  136. *
  137. * @param r zero-based row of the table
  138. * @param c zero-based column of the table
  139. * @return the boolean value true if the accessible at the
  140. * row and column is selected. Otherwise, the boolean value
  141. * false
  142. */
  143. public boolean isAccessibleSelected(int r, int c);
  144. /**
  145. * Returns a boolean value indicating whether the specified row
  146. * is selected.
  147. *
  148. * @param r zero-based row of the table
  149. * @return the boolean value true if the specified row is selected.
  150. * Otherwise, false.
  151. */
  152. public boolean isAccessibleRowSelected(int r);
  153. /**
  154. * Returns a boolean value indicating whether the specified column
  155. * is selected.
  156. *
  157. * @param c zero-based column of the table
  158. * @return the boolean value true if the specified column is selected.
  159. * Otherwise, false.
  160. */
  161. public boolean isAccessibleColumnSelected(int c);
  162. /**
  163. * Returns the selected rows in a table.
  164. *
  165. * @return an array of selected rows where each element is a
  166. * zero-based row of the table
  167. */
  168. public int [] getSelectedAccessibleRows();
  169. /**
  170. * Returns the selected columns in a table.
  171. *
  172. * @return an array of selected columns where each element is a
  173. * zero-based column of the table
  174. */
  175. public int [] getSelectedAccessibleColumns();
  176. }