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.SWTEventListener;
19 * Classes which implement this interface provide methods
20 * that handle AccessibleTableCell 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>addAccessibleTableCellListener</code> method and removed using
25 * the <code>removeAccessibleTableCellListener</code> method.
28 * @see AccessibleTableCellAdapter
29 * @see AccessibleTableCellEvent
33 public interface AccessibleTableCellListener extends SWTEventListener {
35 * Returns the number of columns occupied by this cell accessible.
37 * This is 1 if the specified cell is only in one column, or
38 * more than 1 if the specified cell spans multiple columns.
41 * @param e an event object containing the following fields:<ul>
42 * <li>[out] count - the 1 based number of columns spanned by the specified cell
45 public void getColumnSpan(AccessibleTableCellEvent e);
48 * Returns the column headers as an array of cell accessibles.
49 * TODO: doc that this is a more efficient way to get headers of a cell than TableListener.getRow/ColHeaders
51 * @param e an event object containing the following fields:<ul>
52 * <li>[out] accessibles - an array of cell accessibles, or null if there are no column headers
55 public void getColumnHeaders(AccessibleTableCellEvent e);
58 * Translates this cell accessible into the corresponding column index.
60 * @param e an event object containing the following fields:<ul>
61 * <li>[out] index - the 0 based column index of the specified cell,
62 * or the index of the first column if the cell spans multiple columns
65 public void getColumnIndex(AccessibleTableCellEvent e);
68 * Returns the number of rows occupied by this cell accessible.
70 * This is 1 if the specified cell is only in one row, or
71 * more than 1 if the specified cell spans multiple rows.
74 * @param e an event object containing the following fields:<ul>
75 * <li>[out] count - the 1 based number of rows spanned by the specified cell
78 public void getRowSpan(AccessibleTableCellEvent e);
81 * Returns the row headers as an array of cell accessibles.
82 * TODO: doc that this is a more efficient way to get headers of a cell than TableListener.getRow/ColHeaders
84 * @param e an event object containing the following fields:<ul>
85 * <li>[out] accessibles - an array of cell accessibles, or null if there are no row headers
88 public void getRowHeaders(AccessibleTableCellEvent e);
91 * Translates this cell accessible into the corresponding row index.
93 * @param e an event object containing the following fields:<ul>
94 * <li>[out] index - the 0 based row index of the specified cell,
95 * or the index of the first row if the cell spans multiple rows
98 public void getRowIndex(AccessibleTableCellEvent e);
101 * Returns the accessible for the table containing this cell.
103 * @param e an event object containing the following fields:<ul>
104 * <li>[out] accessible - the accessible for the containing table
107 public void getTable(AccessibleTableCellEvent e);
110 * Returns a boolean value indicating whether this cell is selected.
112 * @param e an event object containing the following fields:<ul>
113 * <li>[out] isSelected - true if the specified cell is selected and false otherwise
116 public void isSelected(AccessibleTableCellEvent e);