1 /*******************************************************************************
2 * Copyright (c) 2009, 2010 IBM Corporation and others.
4 * This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License 2.0
6 * which accompanies this distribution, and is available at
7 * https://www.eclipse.org/legal/epl-2.0/
9 * SPDX-License-Identifier: EPL-2.0
12 * IBM Corporation - initial API and implementation
13 *******************************************************************************/
14 package org.eclipse.swt.accessibility;
16 import org.eclipse.swt.internal.*;
19 * Classes which implement this interface provide methods
20 * that handle AccessibleTable events.
22 * After creating an instance of a class that implements
23 * this interface it can be added to an accessible using the
24 * <code>addAccessibleTableListener</code> method and removed using
25 * the <code>removeAccessibleTableListener</code> method.
27 * Many methods in this listener return cell accessible objects,
28 * which should implement <code>AccessibleTableCellListener</code>.
31 * @see AccessibleTableAdapter
32 * @see AccessibleTableEvent
33 * @see AccessibleTableCellListener
34 * @see AccessibleTableCellEvent
38 public interface AccessibleTableListener extends SWTEventListener {
40 * Deselects one column, leaving other selected columns selected (if any).
42 * @param e an event object containing the following fields:<ul>
43 * <li>[in] column - 0 based index of the column to be unselected.</li>
44 * <li>[out] result - set to {@link ACC#OK} if the column was deselected.</li>
47 public void deselectColumn(AccessibleTableEvent e);
50 * Deselects one row, leaving other selected rows selected (if any).
52 * @param e an event object containing the following fields:<ul>
53 * <li>[in] row - 0 based index of the row to be unselected</li>
54 * <li>[out] result - set to {@link ACC#OK} if the row was deselected.</li>
57 public void deselectRow(AccessibleTableEvent e);
60 * Returns the caption for the table.
62 * @param e an event object containing the following fields:<ul>
63 * <li>[out] accessible - the caption for the table, or null if the table does not have a caption</li>
66 * @deprecated IAccessibleTable2::caption is deprecated, instead use the
67 * IA2_RELATION_LABELED_BY relation to create a relation between the table and its caption.
70 public void getCaption(AccessibleTableEvent e);
73 * Returns the accessible object at the specified row and column in the table.
75 * @param e an event object containing the following fields:<ul>
76 * <li>[in] row - the 0 based row index for which to retrieve the accessible cell</li>
77 * <li>[in] column - the 0 based column index for which to retrieve the accessible cell</li>
78 * <li>[out] accessible - the table cell at the specified row and column index,
79 * or null if the row or column index are not valid</li>
82 public void getCell(AccessibleTableEvent e);
85 * Returns the accessible object for the specified column in the table.
87 * @param e an event object containing the following fields:<ul>
88 * <li>[in] column - the 0 based column index for which to retrieve the accessible column</li>
89 * <li>[out] accessible - the table column at the specified column index,
90 * or null if the column index is not valid</li>
93 public void getColumn(AccessibleTableEvent e);
96 * Returns the total number of columns in the table.
98 * @param e an event object containing the following fields:<ul>
99 * <li>[out] count - the number of columns in the table</li>
102 public void getColumnCount(AccessibleTableEvent e);
105 * Returns the description text of the specified column in the table.
107 * @param e an event object containing the following fields:<ul>
108 * <li>[in] column - the 0 based index of the column for which to retrieve the description</li>
109 * <li>[out] result - the description text of the specified column in the table,
110 * or null if the column does not have a description</li>
113 public void getColumnDescription(AccessibleTableEvent e);
116 * Returns the accessible object for the column header.
118 * @param e an event object containing the following fields:<ul>
119 * <li>[out] accessible - an accessible object representing the column header,
120 * or null if there is no column header</li>
123 public void getColumnHeader(AccessibleTableEvent e);
126 * Returns the column header cells as an array of accessible objects.
128 * @param e an event object containing the following fields:<ul>
129 * <li>[out] accessibles - an array of accessible objects representing column header cells,
130 * or null if there are no column header cells</li>
133 public void getColumnHeaderCells(AccessibleTableEvent e);
136 * Returns the columns as an array of accessible objects.
138 * @param e an event object containing the following fields:<ul>
139 * <li>[out] accessibles - an array of accessible objects representing columns,
140 * or null if there are no columns</li>
143 public void getColumns(AccessibleTableEvent e);
146 * Returns the accessible object for the specified row in the table.
148 * @param e an event object containing the following fields:<ul>
149 * <li>[in] row - the 0 based row index for which to retrieve the accessible row</li>
150 * <li>[out] accessible - the table row at the specified row index,
151 * or null if the row index is not valid</li>
154 public void getRow(AccessibleTableEvent e);
157 * Returns the total number of rows in the table.
159 * @param e an event object containing the following fields:<ul>
160 * <li>[out] count - the number of rows in the table</li>
163 public void getRowCount(AccessibleTableEvent e);
166 * Returns the description text of the specified row in the table.
168 * @param e an event object containing the following fields:<ul>
169 * <li>[in] row - the 0 based index of the row for which to retrieve the description</li>
170 * <li>[out] result - the description text of the specified row in the table,
171 * or null if the row does not have a description</li>
174 public void getRowDescription(AccessibleTableEvent e);
177 * Returns the accessible object for the row header.
179 * @param e an event object containing the following fields:<ul>
180 * <li>[out] accessible - an accessible object representing the row header,
181 * or null if there is no row header</li>
184 public void getRowHeader(AccessibleTableEvent e);
187 * Returns the row header cells as an array of accessible objects.
189 * @param e an event object containing the following fields:<ul>
190 * <li>[out] accessibles - an array of accessible objects representing row header cells,
191 * or null if there are no row header cells</li>
194 public void getRowHeaderCells(AccessibleTableEvent e);
197 * Returns the rows as an array of accessible objects.
199 * @param e an event object containing the following fields:<ul>
200 * <li>[out] accessibles - an array of accessible objects representing rows,
201 * or null if there are no rows</li>
204 public void getRows(AccessibleTableEvent e);
207 * Returns the number of selected cells.
209 * @param e an event object containing the following fields:<ul>
210 * <li>[out] count - the number of cells currently selected</li>
213 public void getSelectedCellCount(AccessibleTableEvent e);
216 * Returns the currently selected cells.
218 * @param e an event object containing the following fields:<ul>
219 * <li>[out] accessibles - array containing the selected accessible cells</li>
222 public void getSelectedCells(AccessibleTableEvent e);
225 * Returns the number of selected columns.
227 * @param e an event object containing the following fields:<ul>
228 * <li>[out] count - the number of columns currently selected</li>
231 public void getSelectedColumnCount(AccessibleTableEvent e);
234 * Returns the column indexes that are currently selected.
236 * @param e an event object containing the following fields:<ul>
237 * <li>[out] selected - an array of 0 based column indexes of selected columns</li>
240 public void getSelectedColumns(AccessibleTableEvent e);
243 * Returns the number of selected rows.
245 * @param e an event object containing the following fields:<ul>
246 * <li>[out] count - the number of rows currently selected</li>
249 public void getSelectedRowCount(AccessibleTableEvent e);
252 * Returns the row indexes that are currently selected.
254 * @param e an event object containing the following fields:<ul>
255 * <li>[out] selected - an array of 0 based row indexes of selected rows</li>
258 public void getSelectedRows(AccessibleTableEvent e);
261 * Returns the summary description of the table.
263 * @param e an event object containing the following fields:<ul>
264 * <li>[out] accessible - the summary for the table,
265 * or null if the table does not have a summary</li>
268 * @deprecated IAccessibleTable2::summary is deprecated, instead use the
269 * IA2_RELATION_DESCRIBED_BY relation to create a relation between the table and its summary.
272 public void getSummary(AccessibleTableEvent e);
275 * Returns the visible columns as an array of accessible objects.
277 * @param e an event object containing the following fields:<ul>
278 * <li>[out] accessibles - an array of accessible objects representing visible columns,
279 * or null if there are no visible columns</li>
282 public void getVisibleColumns(AccessibleTableEvent e);
285 * Returns the visible rows as an array of accessible objects.
287 * @param e an event object containing the following fields:<ul>
288 * <li>[out] accessibles - an array of accessible objects representing visible rows,
289 * or null if there are no visible rows</li>
292 public void getVisibleRows(AccessibleTableEvent e);
295 * Returns a boolean value indicating whether the specified column is
296 * completely selected.
298 * @param e an event object containing the following fields:<ul>
299 * <li>[in] column - 0 based index of the column for which to determine whether it is selected</li>
300 * <li>[out] isSelected - true if the specified column is selected completely, and false otherwise</li>
303 public void isColumnSelected(AccessibleTableEvent e);
306 * Returns a boolean value indicating whether the specified row is
307 * completely selected.
309 * @param e an event object containing the following fields:<ul>
310 * <li>[in] row - 0 based index of the row for which to determine whether it is selected</li>
311 * <li>[out] isSelected - true if the specified row is selected completely, and false otherwise</li>
314 public void isRowSelected(AccessibleTableEvent e);
319 * @param e an event object containing the following fields:<ul>
320 * <li>[in] column - 0 based index of the column to be selected</li>
321 * <li>[out] result - set to {@link ACC#OK} if the column was selected.</li>
324 public void selectColumn(AccessibleTableEvent e);
329 * @param e an event object containing the following fields:<ul>
330 * <li>[in] row - 0 based index of the row to be selected</li>
331 * <li>[out] result - set to {@link ACC#OK} if the row was selected.</li>
334 public void selectRow(AccessibleTableEvent e);
337 * Selects a column and deselects all previously selected columns.
339 * @param e an event object containing the following fields:<ul>
340 * <li>[in] column - 0 based index of the column to be selected</li>
341 * <li>[out] result - set to {@link ACC#OK} if the column was selected.</li>
344 public void setSelectedColumn(AccessibleTableEvent e);
347 * Selects a row and deselects all previously selected rows.
349 * @param e an event object containing the following fields:<ul>
350 * <li>[in] row - 0 based index of the row to be selected</li>
351 * <li>[out] result - set to {@link ACC#OK} if the row was selected.</li>
354 public void setSelectedRow(AccessibleTableEvent e);