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