Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.swing
Class JTable.AccessibleJTable  view JTable.AccessibleJTable download JTable.AccessibleJTable.java

java.lang.Object
  extended byjavax.accessibility.AccessibleContext
      extended byjava.awt.Component.AccessibleAWTComponent
          extended byjava.awt.Container.AccessibleAWTContainer
              extended byjavax.swing.JComponent.AccessibleJComponent
                  extended byjavax.swing.JTable.AccessibleJTable
All Implemented Interfaces:
javax.accessibility.AccessibleComponent, javax.accessibility.AccessibleExtendedComponent, javax.accessibility.AccessibleExtendedTable, javax.accessibility.AccessibleSelection, javax.accessibility.AccessibleTable, javax.swing.event.CellEditorListener, java.util.EventListener, javax.swing.event.ListSelectionListener, java.beans.PropertyChangeListener, java.io.Serializable, javax.swing.event.TableColumnModelListener, javax.swing.event.TableModelListener
Enclosing class:
JTable

protected class JTable.AccessibleJTable
extends JComponent.AccessibleJComponent
implements javax.accessibility.AccessibleSelection, javax.swing.event.ListSelectionListener, javax.swing.event.TableModelListener, javax.swing.event.TableColumnModelListener, javax.swing.event.CellEditorListener, java.beans.PropertyChangeListener, javax.accessibility.AccessibleExtendedTable

Provides accessibility support for JTable.


Nested Class Summary
protected  class JTable.AccessibleJTable.AccessibleJTableCell
          Provides accessibility support for table cells.
protected  class JTable.AccessibleJTable.AccessibleJTableModelChange
           
 
Nested classes inherited from class javax.swing.JComponent.AccessibleJComponent
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
 
Nested classes inherited from class java.awt.Component.AccessibleAWTComponent
java.awt.Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, java.awt.Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
 
Field Summary
 
Fields inherited from class javax.swing.JComponent.AccessibleJComponent
accessibleContainerHandler, accessibleFocusHandler
 
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_COMPONENT_BOUNDS_CHANGED, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_HYPERTEXT_OFFSET, ACCESSIBLE_INVALIDATE_CHILDREN, 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_ATTRIBUTES_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent
 
Constructor Summary
protected JTable.AccessibleJTable()
          Creates a new AccessibleJTable.
 
Method Summary
 void addAccessibleSelection(int i)
          Select the specified child if it is not already selected, placing it in the object's current selection.
 void clearAccessibleSelection()
          Unselect all children of this Accessible object.
 void columnAdded(javax.swing.event.TableColumnModelEvent event)
          Called by the javax.swing.table.TableColumnModel to indicate that a column has been added to the model.
 void columnMarginChanged(javax.swing.event.ChangeEvent event)
          Called by the javax.swing.table.TableColumnModel to indicate that the model's column margin has changed.
 void columnMoved(javax.swing.event.TableColumnModelEvent event)
          Called by the javax.swing.table.TableColumnModel to indicate that a column has been moved.
 void columnRemoved(javax.swing.event.TableColumnModelEvent event)
          Called by the javax.swing.table.TableColumnModel to indicate that a column has been removed from the model.
 void columnSelectionChanged(javax.swing.event.ListSelectionEvent event)
          Called by the javax.swing.table.TableColumnModel to indicate that the column selection state has changed.
 void editingCanceled(javax.swing.event.ChangeEvent event)
          Editing has been canceled
 void editingStopped(javax.swing.event.ChangeEvent event)
          Editing has been stopped
 javax.accessibility.Accessible getAccessibleAt(int r, int c)
          Return the cell at the specified row and column, or null if out of bounds.
 javax.accessibility.Accessible getAccessibleCaption()
          Return the caption for the table, or null if unknown.
 int getAccessibleColumn(int index)
          Returns the column number of an index in the table.
 int getAccessibleColumnAtIndex(int index)
          Returns the accessible column at the specified index.
 int getAccessibleColumnCount()
          Return the number of columns in the table.
 javax.accessibility.Accessible getAccessibleColumnDescription(int c)
          Return the description of a column, or null if there is none or the index is out of bounds.
 int getAccessibleColumnExtentAt(int r, int c)
          Returns the number of merged columns occupied at the specified row and column, or 0 if out of bounds.
 javax.accessibility.AccessibleTable getAccessibleColumnHeader()
          Return the column headers as a table.
 int getAccessibleIndex(int r, int c)
          Returns the cell number for a row-major address from (0,0).
 int getAccessibleIndexAt(int row, int column)
          Returns the accessible child index at the specified column and row.
 int getAccessibleRow(int index)
          Returns the row number of an index in the table.
 int getAccessibleRowAtIndex(int index)
          Returns the accessible row at the specified index.
 int getAccessibleRowCount()
          Return the number of rows in the table.
 javax.accessibility.Accessible getAccessibleRowDescription(int r)
          Return the description of a row, or null if there is none or the index is out of bounds.
 int getAccessibleRowExtentAt(int r, int c)
          Returns the number of merged rows occupied at the specified row and column, or 0 if out of bounds.
 javax.accessibility.AccessibleTable getAccessibleRowHeader()
          Return the row headers as a table.
 javax.accessibility.Accessible getAccessibleSelection(int i)
          Returns the i-th selected child (not necessarily the overall i-th child) of this Accessible object.
 int getAccessibleSelectionCount()
          Returns the number of selected items in this table.
 javax.accessibility.Accessible getAccessibleSummary()
          Return the summary description of the table, or null if unknown.
 int[] getSelectedAccessibleColumns()
          Return the selected columns.
 int[] getSelectedAccessibleRows()
          Return the selected rows.
 boolean isAccessibleChildSelected(int i)
          Determine if i-th overall child of this accessible object is selected.
 boolean isAccessibleColumnSelected(int c)
          Return whether the specified column is selected.
 boolean isAccessibleRowSelected(int r)
          Return whether the specified row is selected.
 boolean isAccessibleSelected(int r, int c)
          Return whether the cell at the specified location is selected.
 void propertyChange(java.beans.PropertyChangeEvent e)
          Receives notification when any of the JTable's properties changes.
 void removeAccessibleSelection(int i)
          Unselect the specified child of this Accessible object.
 void selectAllAccessibleSelection()
          Select all children of this Accessible object if the object supports multiple selections or has a single child.
 void setAccessibleCaption(javax.accessibility.Accessible caption)
          Set the table caption.
 void setAccessibleColumnDescription(int c, javax.accessibility.Accessible description)
          Set the description of a column.
 void setAccessibleColumnHeader(javax.accessibility.AccessibleTable header)
          Set the column headers.
 void setAccessibleRowDescription(int r, javax.accessibility.Accessible description)
          Set the description of a row.
 void setAccessibleRowHeader(javax.accessibility.AccessibleTable header)
          Set the row headers.
 void setAccessibleSummary(javax.accessibility.Accessible summary)
          Set the table summary description.
 void tableChanged(javax.swing.event.TableModelEvent event)
          Receives notification when the table model changes.
 void tableRowsDeleted(javax.swing.event.TableModelEvent event)
          Receives notification when one or more rows have been deleted from the table.
 void tableRowsInserted(javax.swing.event.TableModelEvent event)
          Receives notification when one or more rows have been inserted into the table.
 void valueChanged(javax.swing.event.ListSelectionEvent event)
          Receives notification of a javax.swing.event.ListSelectionEvent.
 
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
 
Methods inherited from class java.awt.Component.AccessibleAWTComponent
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
 
Methods inherited from class javax.accessibility.AccessibleContext
firePropertyChange, getAccessibleAction, getAccessibleEditableText, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleText, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.accessibility.AccessibleComponent
addFocusListener, contains, getAccessibleAt, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
 

Constructor Detail

JTable.AccessibleJTable

protected JTable.AccessibleJTable()
Creates a new AccessibleJTable.

Since:
JDK1.5
Method Detail

getAccessibleSelectionCount

public int getAccessibleSelectionCount()
Returns the number of selected items in this table.

Specified by:
getAccessibleSelectionCount in interface javax.accessibility.AccessibleSelection

getAccessibleSelection

public javax.accessibility.Accessible getAccessibleSelection(int i)
Description copied from interface: javax.accessibility.AccessibleSelection
Returns the i-th selected child (not necessarily the overall i-th child) of this Accessible object. If i is out of bounds, null is returned.

Specified by:
getAccessibleSelection in interface javax.accessibility.AccessibleSelection

isAccessibleChildSelected

public boolean isAccessibleChildSelected(int i)
Description copied from interface: javax.accessibility.AccessibleSelection
Determine if i-th overall child of this accessible object is selected. If i is out of bounds, false is returned.

Specified by:
isAccessibleChildSelected in interface javax.accessibility.AccessibleSelection

addAccessibleSelection

public void addAccessibleSelection(int i)
Description copied from interface: javax.accessibility.AccessibleSelection
Select the specified child if it is not already selected, placing it in the object's current selection. If the object does not support multiple selections then the new selection replaces the old. If the specified child is already selected, or is out of bounds, this method does nothing.

Specified by:
addAccessibleSelection in interface javax.accessibility.AccessibleSelection

removeAccessibleSelection

public void removeAccessibleSelection(int i)
Description copied from interface: javax.accessibility.AccessibleSelection
Unselect the specified child of this Accessible object. If the specified child is not selected, or is out of bounds, this method does nothing.

Specified by:
removeAccessibleSelection in interface javax.accessibility.AccessibleSelection

clearAccessibleSelection

public void clearAccessibleSelection()
Description copied from interface: javax.accessibility.AccessibleSelection
Unselect all children of this Accessible object.

Specified by:
clearAccessibleSelection in interface javax.accessibility.AccessibleSelection

selectAllAccessibleSelection

public void selectAllAccessibleSelection()
Description copied from interface: javax.accessibility.AccessibleSelection
Select all children of this Accessible object if the object supports multiple selections or has a single child. Otherwise this does nothing.

Specified by:
selectAllAccessibleSelection in interface javax.accessibility.AccessibleSelection

valueChanged

public void valueChanged(javax.swing.event.ListSelectionEvent event)
Description copied from interface: javax.swing.event.ListSelectionListener
Receives notification of a javax.swing.event.ListSelectionEvent.

Specified by:
valueChanged in interface javax.swing.event.ListSelectionListener

tableChanged

public void tableChanged(javax.swing.event.TableModelEvent event)
Receives notification when the table model changes. Depending on the type of change, this method calls tableRowsInserted(javax.swing.event.TableModelEvent) 55 or tableRowsDeleted(javax.swing.event.TableModelEvent) 55 .

Specified by:
tableChanged in interface javax.swing.event.TableModelListener

tableRowsInserted

public void tableRowsInserted(javax.swing.event.TableModelEvent event)
Receives notification when one or more rows have been inserted into the table.


tableRowsDeleted

public void tableRowsDeleted(javax.swing.event.TableModelEvent event)
Receives notification when one or more rows have been deleted from the table.


columnAdded

public void columnAdded(javax.swing.event.TableColumnModelEvent event)
Description copied from interface: javax.swing.event.TableColumnModelListener
Called by the javax.swing.table.TableColumnModel to indicate that a column has been added to the model.

Specified by:
columnAdded in interface javax.swing.event.TableColumnModelListener

columnMarginChanged

public void columnMarginChanged(javax.swing.event.ChangeEvent event)
Description copied from interface: javax.swing.event.TableColumnModelListener
Called by the javax.swing.table.TableColumnModel to indicate that the model's column margin has changed.

Specified by:
columnMarginChanged in interface javax.swing.event.TableColumnModelListener

columnMoved

public void columnMoved(javax.swing.event.TableColumnModelEvent event)
Description copied from interface: javax.swing.event.TableColumnModelListener
Called by the javax.swing.table.TableColumnModel to indicate that a column has been moved.

Specified by:
columnMoved in interface javax.swing.event.TableColumnModelListener

columnRemoved

public void columnRemoved(javax.swing.event.TableColumnModelEvent event)
Description copied from interface: javax.swing.event.TableColumnModelListener
Called by the javax.swing.table.TableColumnModel to indicate that a column has been removed from the model.

Specified by:
columnRemoved in interface javax.swing.event.TableColumnModelListener

columnSelectionChanged

public void columnSelectionChanged(javax.swing.event.ListSelectionEvent event)
Description copied from interface: javax.swing.event.TableColumnModelListener
Called by the javax.swing.table.TableColumnModel to indicate that the column selection state has changed.

Specified by:
columnSelectionChanged in interface javax.swing.event.TableColumnModelListener

editingCanceled

public void editingCanceled(javax.swing.event.ChangeEvent event)
Description copied from interface: javax.swing.event.CellEditorListener
Editing has been canceled

Specified by:
editingCanceled in interface javax.swing.event.CellEditorListener

editingStopped

public void editingStopped(javax.swing.event.ChangeEvent event)
Description copied from interface: javax.swing.event.CellEditorListener
Editing has been stopped

Specified by:
editingStopped in interface javax.swing.event.CellEditorListener

propertyChange

public void propertyChange(java.beans.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 java.beans.PropertyChangeListener

getAccessibleRow

public int getAccessibleRow(int index)
Description copied from interface: javax.accessibility.AccessibleExtendedTable
Returns the row number of an index in the table.

Specified by:
getAccessibleRow in interface javax.accessibility.AccessibleExtendedTable

getAccessibleColumn

public int getAccessibleColumn(int index)
Description copied from interface: javax.accessibility.AccessibleExtendedTable
Returns the column number of an index in the table.

Specified by:
getAccessibleColumn in interface javax.accessibility.AccessibleExtendedTable

getAccessibleIndex

public int getAccessibleIndex(int r,
                              int c)
Description copied from interface: javax.accessibility.AccessibleExtendedTable
Returns the cell number for a row-major address from (0,0).

Specified by:
getAccessibleIndex in interface javax.accessibility.AccessibleExtendedTable

getAccessibleCaption

public javax.accessibility.Accessible getAccessibleCaption()
Description copied from interface: javax.accessibility.AccessibleTable
Return the caption for the table, or null if unknown.

Specified by:
getAccessibleCaption in interface javax.accessibility.AccessibleTable

setAccessibleCaption

public void setAccessibleCaption(javax.accessibility.Accessible caption)
Description copied from interface: javax.accessibility.AccessibleTable
Set the table caption.

Specified by:
setAccessibleCaption in interface javax.accessibility.AccessibleTable

getAccessibleSummary

public javax.accessibility.Accessible getAccessibleSummary()
Description copied from interface: javax.accessibility.AccessibleTable
Return the summary description of the table, or null if unknown.

Specified by:
getAccessibleSummary in interface javax.accessibility.AccessibleTable

setAccessibleSummary

public void setAccessibleSummary(javax.accessibility.Accessible summary)
Description copied from interface: javax.accessibility.AccessibleTable
Set the table summary description.

Specified by:
setAccessibleSummary in interface javax.accessibility.AccessibleTable

getAccessibleRowCount

public int getAccessibleRowCount()
Description copied from interface: javax.accessibility.AccessibleTable
Return the number of rows in the table.

Specified by:
getAccessibleRowCount in interface javax.accessibility.AccessibleTable

getAccessibleColumnCount

public int getAccessibleColumnCount()
Description copied from interface: javax.accessibility.AccessibleTable
Return the number of columns in the table.

Specified by:
getAccessibleColumnCount in interface javax.accessibility.AccessibleTable

getAccessibleAt

public javax.accessibility.Accessible getAccessibleAt(int r,
                                                      int c)
Description copied from interface: javax.accessibility.AccessibleTable
Return the cell at the specified row and column, or null if out of bounds.

Specified by:
getAccessibleAt in interface javax.accessibility.AccessibleTable

getAccessibleRowExtentAt

public int getAccessibleRowExtentAt(int r,
                                    int c)
Description copied from interface: javax.accessibility.AccessibleTable
Returns the number of merged rows occupied at the specified row and column, or 0 if out of bounds.

Specified by:
getAccessibleRowExtentAt in interface javax.accessibility.AccessibleTable

getAccessibleColumnExtentAt

public int getAccessibleColumnExtentAt(int r,
                                       int c)
Description copied from interface: javax.accessibility.AccessibleTable
Returns the number of merged columns occupied at the specified row and column, or 0 if out of bounds.

Specified by:
getAccessibleColumnExtentAt in interface javax.accessibility.AccessibleTable

getAccessibleRowHeader

public javax.accessibility.AccessibleTable getAccessibleRowHeader()
Description copied from interface: javax.accessibility.AccessibleTable
Return the row headers as a table.

Specified by:
getAccessibleRowHeader in interface javax.accessibility.AccessibleTable

setAccessibleRowHeader

public void setAccessibleRowHeader(javax.accessibility.AccessibleTable header)
Description copied from interface: javax.accessibility.AccessibleTable
Set the row headers.

Specified by:
setAccessibleRowHeader in interface javax.accessibility.AccessibleTable

getAccessibleColumnHeader

public javax.accessibility.AccessibleTable getAccessibleColumnHeader()
Description copied from interface: javax.accessibility.AccessibleTable
Return the column headers as a table.

Specified by:
getAccessibleColumnHeader in interface javax.accessibility.AccessibleTable

setAccessibleColumnHeader

public void setAccessibleColumnHeader(javax.accessibility.AccessibleTable header)
Description copied from interface: javax.accessibility.AccessibleTable
Set the column headers.

Specified by:
setAccessibleColumnHeader in interface javax.accessibility.AccessibleTable

getAccessibleRowDescription

public javax.accessibility.Accessible getAccessibleRowDescription(int r)
Description copied from interface: javax.accessibility.AccessibleTable
Return the description of a row, or null if there is none or the index is out of bounds.

Specified by:
getAccessibleRowDescription in interface javax.accessibility.AccessibleTable

setAccessibleRowDescription

public void setAccessibleRowDescription(int r,
                                        javax.accessibility.Accessible description)
Description copied from interface: javax.accessibility.AccessibleTable
Set the description of a row. Does nothing if the index is invalid.

Specified by:
setAccessibleRowDescription in interface javax.accessibility.AccessibleTable

getAccessibleColumnDescription

public javax.accessibility.Accessible getAccessibleColumnDescription(int c)
Description copied from interface: javax.accessibility.AccessibleTable
Return the description of a column, or null if there is none or the index is out of bounds.

Specified by:
getAccessibleColumnDescription in interface javax.accessibility.AccessibleTable

setAccessibleColumnDescription

public void setAccessibleColumnDescription(int c,
                                           javax.accessibility.Accessible description)
Description copied from interface: javax.accessibility.AccessibleTable
Set the description of a column. Does nothing if the index is invalid.

Specified by:
setAccessibleColumnDescription in interface javax.accessibility.AccessibleTable

isAccessibleSelected

public boolean isAccessibleSelected(int r,
                                    int c)
Description copied from interface: javax.accessibility.AccessibleTable
Return whether the cell at the specified location is selected. Returns false if the index is out of bounds.

Specified by:
isAccessibleSelected in interface javax.accessibility.AccessibleTable

isAccessibleRowSelected

public boolean isAccessibleRowSelected(int r)
Description copied from interface: javax.accessibility.AccessibleTable
Return whether the specified row is selected. Returns false if the index is out of bounds.

Specified by:
isAccessibleRowSelected in interface javax.accessibility.AccessibleTable

isAccessibleColumnSelected

public boolean isAccessibleColumnSelected(int c)
Description copied from interface: javax.accessibility.AccessibleTable
Return whether the specified column is selected. Returns false if the index is out of bounds.

Specified by:
isAccessibleColumnSelected in interface javax.accessibility.AccessibleTable

getSelectedAccessibleRows

public int[] getSelectedAccessibleRows()
Description copied from interface: javax.accessibility.AccessibleTable
Return the selected rows. May be null or empty if there is no selection.

Specified by:
getSelectedAccessibleRows in interface javax.accessibility.AccessibleTable

getSelectedAccessibleColumns

public int[] getSelectedAccessibleColumns()
Description copied from interface: javax.accessibility.AccessibleTable
Return the selected columns. May be null or empty if there is no selection.

Specified by:
getSelectedAccessibleColumns in interface javax.accessibility.AccessibleTable

getAccessibleRowAtIndex

public int getAccessibleRowAtIndex(int index)
Returns the accessible row at the specified index.


getAccessibleColumnAtIndex

public int getAccessibleColumnAtIndex(int index)
Returns the accessible column at the specified index.


getAccessibleIndexAt

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