Path: blob/master/src/java.desktop/share/classes/javax/accessibility/AccessibleTable.java
41153 views
/*1* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package javax.accessibility;2627/**28* Class {@code AccessibleTable} describes a user-interface component that29* presents data in a two-dimensional table format.30*31* @author Lynn Monsanto32* @since 1.333*/34public interface AccessibleTable {3536/**37* Returns the caption for the table.38*39* @return the caption for the table40*/41public Accessible getAccessibleCaption();4243/**44* Sets the caption for the table.45*46* @param a the caption for the table47*/48public void setAccessibleCaption(Accessible a);4950/**51* Returns the summary description of the table.52*53* @return the summary description of the table54*/55public Accessible getAccessibleSummary();5657/**58* Sets the summary description of the table.59*60* @param a the summary description of the table61*/62public void setAccessibleSummary(Accessible a);6364/**65* Returns the number of rows in the table.66*67* @return the number of rows in the table68*/69public int getAccessibleRowCount();7071/**72* Returns the number of columns in the table.73*74* @return the number of columns in the table75*/76public int getAccessibleColumnCount();7778/**79* Returns the {@code Accessible} at a specified row and column in the80* table.81*82* @param r zero-based row of the table83* @param c zero-based column of the table84* @return the {@code Accessible} at the specified row and column85*/86public Accessible getAccessibleAt(int r, int c);8788/**89* Returns the number of rows occupied by the {@code Accessible} at a90* specified row and column in the table.91*92* @param r zero-based row of the table93* @param c zero-based column of the table94* @return the number of rows occupied by the {@code Accessible} at a given95* specified (row, column)96*/97public int getAccessibleRowExtentAt(int r, int c);9899/**100* Returns the number of columns occupied by the {@code Accessible} at a101* specified row and column in the table.102*103* @param r zero-based row of the table104* @param c zero-based column of the table105* @return the number of columns occupied by the {@code Accessible} at a106* given specified row and column107*/108public int getAccessibleColumnExtentAt(int r, int c);109110/**111* Returns the row headers as an {@code AccessibleTable}.112*113* @return an {@code AccessibleTable} representing the row headers114*/115public AccessibleTable getAccessibleRowHeader();116117/**118* Sets the row headers.119*120* @param table an {@code AccessibleTable} representing the row headers121*/122public void setAccessibleRowHeader(AccessibleTable table);123124/**125* Returns the column headers as an {@code AccessibleTable}.126*127* @return an {@code AccessibleTable} representing the column headers128*/129public AccessibleTable getAccessibleColumnHeader();130131/**132* Sets the column headers.133*134* @param table an {@code AccessibleTable} representing the column headers135*/136public void setAccessibleColumnHeader(AccessibleTable table);137138/**139* Returns the description of the specified row in the table.140*141* @param r zero-based row of the table142* @return the description of the row143*/144public Accessible getAccessibleRowDescription(int r);145146/**147* Sets the description text of the specified row of the table.148*149* @param r zero-based row of the table150* @param a the description of the row151*/152public void setAccessibleRowDescription(int r, Accessible a);153154/**155* Returns the description text of the specified column in the table.156*157* @param c zero-based column of the table158* @return the text description of the column159*/160public Accessible getAccessibleColumnDescription(int c);161162/**163* Sets the description text of the specified column in the table.164*165* @param c zero-based column of the table166* @param a the text description of the column167*/168public void setAccessibleColumnDescription(int c, Accessible a);169170/**171* Returns a boolean value indicating whether the accessible at a specified172* row and column is selected.173*174* @param r zero-based row of the table175* @param c zero-based column of the table176* @return the boolean value {@code true} if the accessible at the row and177* column is selected. Otherwise, the boolean value {@code false}178*/179public boolean isAccessibleSelected(int r, int c);180181/**182* Returns a boolean value indicating whether the specified row is selected.183*184* @param r zero-based row of the table185* @return the boolean value {@code true} if the specified row is selected.186* Otherwise, {@code false}.187*/188public boolean isAccessibleRowSelected(int r);189190/**191* Returns a boolean value indicating whether the specified column is192* selected.193*194* @param c zero-based column of the table195* @return the boolean value {@code true} if the specified column is196* selected. Otherwise, {@code false}.197*/198public boolean isAccessibleColumnSelected(int c);199200/**201* Returns the selected rows in a table.202*203* @return an array of selected rows where each element is a zero-based row204* of the table205*/206public int[] getSelectedAccessibleRows();207208/**209* Returns the selected columns in a table.210*211* @return an array of selected columns where each element is a zero-based212* column of the table213*/214public int[] getSelectedAccessibleColumns();215}216217218