javax.swing

Class JTable.AccessibleJTable

Enclosing Class:
JTable
Implemented Interfaces:
AccessibleComponent, AccessibleExtendedComponent, AccessibleExtendedTable, AccessibleSelection, AccessibleTable, CellEditorListener, EventListener, ListSelectionListener, PropertyChangeListener, Serializable, TableColumnModelListener, TableModelListener

protected class JTable.AccessibleJTable
extends JComponent.AccessibleJComponent
implements AccessibleSelection, ListSelectionListener, TableModelListener, TableColumnModelListener, CellEditorListener, PropertyChangeListener, AccessibleExtendedTable

Provides accessibility support for JTable.
See Also:
Serialized Form

Nested Class Summary

protected class
JTable.AccessibleJTable.AccessibleJTableCell
Provides accessibility support for table cells.
protected class
JTable.AccessibleJTable.AccessibleJTableModelChange

Nested classes/interfaces inherited from class javax.swing.JComponent.AccessibleJComponent

JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler

Nested classes/interfaces inherited from class java.awt.Container.AccessibleAWTContainer

Container.AccessibleAWTContainer.AccessibleContainerHandler

Nested classes/interfaces inherited from class java.awt.Component.AccessibleAWTComponent

Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler

Field Summary

Fields inherited from class javax.swing.JComponent.AccessibleJComponent

accessibleContainerHandler, accessibleFocusHandler

Fields inherited from class java.awt.Container.AccessibleAWTContainer

accessibleContainerHandler

Fields inherited from class java.awt.Component.AccessibleAWTComponent

accessibleAWTComponentHandler, accessibleAWTFocusHandler

Fields inherited from class javax.accessibility.AccessibleContext

ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_HYPERTEXT_OFFSET, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent

Constructor Summary

AccessibleJTable()
Creates a new AccessibleJTable.

Method Summary

void
addAccessibleSelection(int i)
void
clearAccessibleSelection()
void
columnAdded(TableColumnModelEvent event)
void
columnMarginChanged(ChangeEvent event)
void
columnMoved(TableColumnModelEvent event)
void
columnRemoved(TableColumnModelEvent event)
void
columnSelectionChanged(ListSelectionEvent event)
void
editingCanceled(ChangeEvent event)
void
editingStopped(ChangeEvent event)
Accessible
getAccessibleAt(int r, int c)
Accessible
getAccessibleCaption()
int
getAccessibleColumn(int index)
int
getAccessibleColumnAtIndex(int index)
Returns the accessible column at the specified index.
int
getAccessibleColumnCount()
Accessible
getAccessibleColumnDescription(int c)
int
getAccessibleColumnExtentAt(int r, int c)
AccessibleTable
getAccessibleColumnHeader()
int
getAccessibleIndex(int r, int c)
int
getAccessibleIndexAt(int row, int column)
Returns the accessible child index at the specified column and row.
int
getAccessibleRow(int index)
int
getAccessibleRowAtIndex(int index)
Returns the accessible row at the specified index.
int
getAccessibleRowCount()
Accessible
getAccessibleRowDescription(int r)
int
getAccessibleRowExtentAt(int r, int c)
AccessibleTable
getAccessibleRowHeader()
Accessible
getAccessibleSelection(int i)
int
getAccessibleSelectionCount()
Returns the number of selected items in this table.
Accessible
getAccessibleSummary()
int[]
getSelectedAccessibleColumns()
int[]
getSelectedAccessibleRows()
boolean
isAccessibleChildSelected(int i)
boolean
isAccessibleColumnSelected(int c)
boolean
isAccessibleRowSelected(int r)
boolean
isAccessibleSelected(int r, int c)
void
propertyChange(PropertyChangeEvent e)
Receives notification when any of the JTable's properties changes.
void
removeAccessibleSelection(int i)
void
selectAllAccessibleSelection()
void
setAccessibleCaption(Accessible caption)
void
setAccessibleColumnDescription(int c, Accessible description)
void
setAccessibleColumnHeader(AccessibleTable header)
void
setAccessibleRowDescription(int r, Accessible description)
void
setAccessibleRowHeader(AccessibleTable header)
void
setAccessibleSummary(Accessible summary)
void
tableChanged(TableModelEvent event)
Receives notification when the table model changes.
void
tableRowsDeleted(TableModelEvent event)
Receives notification when one or more rows have been deleted from the table.
void
tableRowsInserted(TableModelEvent event)
Receives notification when one or more rows have been inserted into the table.
void
valueChanged(ListSelectionEvent event)

Methods inherited from class javax.swing.JComponent.AccessibleJComponent

addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleKeyBinding, getAccessibleName, getAccessibleRole, getAccessibleStateSet, getBorderTitle, getTitledBorderText, getToolTipText, removePropertyChangeListener

Methods inherited from class java.awt.Container.AccessibleAWTContainer

getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount

Methods inherited from class java.awt.Component.AccessibleAWTComponent

addFocusListener, addPropertyChangeListener, contains, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleName, getAccessibleParent, getAccessibleRole, getAccessibleStateSet, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, removePropertyChangeListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible

Methods inherited from class javax.accessibility.AccessibleContext

addPropertyChangeListener, firePropertyChange, getAccessibleAction, getAccessibleChild, getAccessibleChildrenCount, getAccessibleComponent, getAccessibleDescription, getAccessibleEditableText, getAccessibleIcon, getAccessibleIndexInParent, getAccessibleName, getAccessibleParent, getAccessibleRelationSet, getAccessibleRole, getAccessibleSelection, getAccessibleStateSet, getAccessibleTable, getAccessibleText, getAccessibleValue, getLocale, removePropertyChangeListener, setAccessibleDescription, setAccessibleName, setAccessibleParent

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

AccessibleJTable

protected AccessibleJTable()
Creates a new AccessibleJTable.
Since:
JDK1.5

Method Details

addAccessibleSelection

public void addAccessibleSelection(int i)
Specified by:
addAccessibleSelection in interface AccessibleSelection

clearAccessibleSelection

public void clearAccessibleSelection()
Specified by:
clearAccessibleSelection in interface AccessibleSelection

columnAdded

public void columnAdded(TableColumnModelEvent event)
Specified by:
columnAdded in interface TableColumnModelListener

columnMarginChanged

public void columnMarginChanged(ChangeEvent event)
Specified by:
columnMarginChanged in interface TableColumnModelListener

columnMoved

public void columnMoved(TableColumnModelEvent event)
Specified by:
columnMoved in interface TableColumnModelListener

columnRemoved

public void columnRemoved(TableColumnModelEvent event)
Specified by:
columnRemoved in interface TableColumnModelListener

columnSelectionChanged

public void columnSelectionChanged(ListSelectionEvent event)
Specified by:
columnSelectionChanged in interface TableColumnModelListener

editingCanceled

public void editingCanceled(ChangeEvent event)
Specified by:
editingCanceled in interface CellEditorListener

editingStopped

public void editingStopped(ChangeEvent event)
Specified by:
editingStopped in interface CellEditorListener

getAccessibleAt

public Accessible getAccessibleAt(int r,
                                  int c)
Specified by:
getAccessibleAt in interface AccessibleTable

getAccessibleCaption

public Accessible getAccessibleCaption()
Specified by:
getAccessibleCaption in interface AccessibleTable

getAccessibleColumn

public int getAccessibleColumn(int index)
Specified by:
getAccessibleColumn in interface AccessibleExtendedTable

getAccessibleColumnAtIndex

public int getAccessibleColumnAtIndex(int index)
Returns the accessible column at the specified index.
Parameters:
index - the index for which to query the column
Returns:
the column number at the specified table index

getAccessibleColumnCount

public int getAccessibleColumnCount()
Specified by:
getAccessibleColumnCount in interface AccessibleTable

getAccessibleColumnDescription

public Accessible getAccessibleColumnDescription(int c)
Specified by:
getAccessibleColumnDescription in interface AccessibleTable

getAccessibleColumnExtentAt

public int getAccessibleColumnExtentAt(int r,
                                       int c)
Specified by:
getAccessibleColumnExtentAt in interface AccessibleTable

getAccessibleColumnHeader

public AccessibleTable getAccessibleColumnHeader()
Specified by:
getAccessibleColumnHeader in interface AccessibleTable

getAccessibleIndex

public int getAccessibleIndex(int r,
                              int c)
Specified by:
getAccessibleIndex in interface AccessibleExtendedTable

getAccessibleIndexAt

public int getAccessibleIndexAt(int row,
                                int column)
Returns the accessible child index at the specified column and row.
Parameters:
row - the row
column - the column
Returns:
the index of the accessible child at the specified row and column

getAccessibleRow

public int getAccessibleRow(int index)
Specified by:
getAccessibleRow in interface AccessibleExtendedTable

getAccessibleRowAtIndex

public int getAccessibleRowAtIndex(int index)
Returns the accessible row at the specified index.
Parameters:
index - the index for which to query the row
Returns:
the row number at the specified table index

getAccessibleRowCount

public int getAccessibleRowCount()
Specified by:
getAccessibleRowCount in interface AccessibleTable

getAccessibleRowDescription

public Accessible getAccessibleRowDescription(int r)
Specified by:
getAccessibleRowDescription in interface AccessibleTable

getAccessibleRowExtentAt

public int getAccessibleRowExtentAt(int r,
                                    int c)
Specified by:
getAccessibleRowExtentAt in interface AccessibleTable

getAccessibleRowHeader

public AccessibleTable getAccessibleRowHeader()
Specified by:
getAccessibleRowHeader in interface AccessibleTable

getAccessibleSelection

public Accessible getAccessibleSelection(int i)
Specified by:
getAccessibleSelection in interface AccessibleSelection

getAccessibleSelectionCount

public int getAccessibleSelectionCount()
Returns the number of selected items in this table.
Specified by:
getAccessibleSelectionCount in interface AccessibleSelection

getAccessibleSummary

public Accessible getAccessibleSummary()
Specified by:
getAccessibleSummary in interface AccessibleTable

getSelectedAccessibleColumns

public int[] getSelectedAccessibleColumns()
Specified by:
getSelectedAccessibleColumns in interface AccessibleTable

getSelectedAccessibleRows

public int[] getSelectedAccessibleRows()
Specified by:
getSelectedAccessibleRows in interface AccessibleTable

isAccessibleChildSelected

public boolean isAccessibleChildSelected(int i)
Specified by:
isAccessibleChildSelected in interface AccessibleSelection

isAccessibleColumnSelected

public boolean isAccessibleColumnSelected(int c)
Specified by:
isAccessibleColumnSelected in interface AccessibleTable

isAccessibleRowSelected

public boolean isAccessibleRowSelected(int r)
Specified by:
isAccessibleRowSelected in interface AccessibleTable

isAccessibleSelected

public boolean isAccessibleSelected(int r,
                                    int c)
Specified by:
isAccessibleSelected in interface AccessibleTable

propertyChange

public void propertyChange(PropertyChangeEvent e)
Receives notification when any of the JTable's properties changes. This is used to replace the listeners on the table's model, selection model, column model and cell editor.
Specified by:
propertyChange in interface PropertyChangeListener
Parameters:
e - the property change event

removeAccessibleSelection

public void removeAccessibleSelection(int i)
Specified by:
removeAccessibleSelection in interface AccessibleSelection

selectAllAccessibleSelection

public void selectAllAccessibleSelection()
Specified by:
selectAllAccessibleSelection in interface AccessibleSelection

setAccessibleCaption

public void setAccessibleCaption(Accessible caption)
Specified by:
setAccessibleCaption in interface AccessibleTable

setAccessibleColumnDescription

public void setAccessibleColumnDescription(int c,
                                           Accessible description)
Specified by:
setAccessibleColumnDescription in interface AccessibleTable

setAccessibleColumnHeader

public void setAccessibleColumnHeader(AccessibleTable header)
Specified by:
setAccessibleColumnHeader in interface AccessibleTable

setAccessibleRowDescription

public void setAccessibleRowDescription(int r,
                                        Accessible description)
Specified by:
setAccessibleRowDescription in interface AccessibleTable

setAccessibleRowHeader

public void setAccessibleRowHeader(AccessibleTable header)
Specified by:
setAccessibleRowHeader in interface AccessibleTable

setAccessibleSummary

public void setAccessibleSummary(Accessible summary)
Specified by:
setAccessibleSummary in interface AccessibleTable

tableChanged

public void tableChanged(TableModelEvent event)
Receives notification when the table model changes. Depending on the type of change, this method calls tableRowsInserted(TableModelEvent) or tableRowsDeleted(TableModelEvent).
Specified by:
tableChanged in interface TableModelListener
Parameters:
event - the table model event

tableRowsDeleted

public void tableRowsDeleted(TableModelEvent event)
Receives notification when one or more rows have been deleted from the table.
Parameters:
event - the table model event

tableRowsInserted

public void tableRowsInserted(TableModelEvent event)
Receives notification when one or more rows have been inserted into the table.
Parameters:
event - the table model event

valueChanged

public void valueChanged(ListSelectionEvent event)
Specified by:
valueChanged in interface ListSelectionListener

JTable.java -- Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.