| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
protected class JTable.AccessibleJTable extends JComponent.AccessibleJComponent implements AccessibleSelection, ListSelectionListener, TableModelListener, TableColumnModelListener, CellEditorListener, PropertyChangeListener, AccessibleExtendedTable
This class implements accessibility support for the
JTable
class. It provides an implementation of the
Java Accessibility API appropriate to table user-interface elements.
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeansTM
has been added to the java.beans
package.
Please see {@link java.beans.XMLEncoder}.
Nested Class Summary | |
---|---|
protected class |
The class provides an implementation of the Java Accessibility API appropriate to table cells. |
protected class |
|
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 |
Constructor Summary | |
---|---|
protected |
AccessibleJTable constructor |
Method Summary | |
---|---|
void |
addAccessibleSelection(int i) Adds the specified Accessible child of the
object to the object's selection.
|
void |
Clears the selection in the object, so that no children in the object are selected. |
void |
Track changes to the table contents (column insertions) |
void |
Track changes of a column moving due to margin changes. |
void |
Track changes of a column repositioning. |
void |
Track changes to the table contents (column deletions) |
void |
Track that the selection model of the TableColumnModel changed. |
void |
Invoked when editing is canceled. |
void |
Track changes to a cell's contents. |
Accessible |
getAccessibleAt(int r, int c) |
Accessible |
Returns the Accessible child, if one exists,
contained at the local coordinate Point .
|
Accessible |
Returns the caption for the table. |
Accessible |
getAccessibleChild(int i) Returns the nth Accessible child of the object.
|
int |
Returns the number of accessible children in the object. |
int |
getAccessibleColumn(int index) Returns the column number of an index in the table. |
int |
getAccessibleColumnAtIndex(int i) Returns the column at a given index into the table. |
int |
|
Accessible |
Returns the description of the specified column in the table. |
int |
getAccessibleColumnExtentAt(int r, int c) Returns the number of columns occupied by the Accessible at a given (row, column).
|
AccessibleTable |
Returns the column headers as an AccessibleTable .
|
int |
getAccessibleIndex(int r, int c) Returns the index at a row and column in the table. |
int |
getAccessibleIndexAt(int r, int c) Returns the index at a given (row, column) in the table. |
AccessibleRole |
Gets the role of this object. |
int |
getAccessibleRow(int index) Returns the row number of an index in the table. |
int |
getAccessibleRowAtIndex(int i) Returns the row at a given index into the table. |
int |
|
Accessible |
getAccessibleRowDescription(int r) Returns the description of the specified row in the table. |
int |
getAccessibleRowExtentAt(int r, int c) Returns the number of rows occupied by the Accessible
at a specified row and column in the table.
|
AccessibleTable |
Returns the row headers as an AccessibleTable .
|
AccessibleSelection |
Get the AccessibleSelection associated with this object. |
Accessible |
getAccessibleSelection(int i) Returns an Accessible representing the
specified selected child in the object.
|
int |
Returns the number of Accessible children
currently selected.
|
Accessible |
Returns the summary description of the table. |
AccessibleTable |
Gets the AccessibleTable associated with this
object.
|
int[] |
Returns the selected columns in a table. |
int[] |
Returns the selected rows in a table. |
boolean |
isAccessibleChildSelected(int i) Determines if the current child of this object is selected. |
boolean |
isAccessibleColumnSelected(int c) Returns a boolean value indicating whether the specified column is selected. |
boolean |
isAccessibleRowSelected(int r) Returns a boolean value indicating whether the specified row is selected. |
boolean |
isAccessibleSelected(int r, int c) Returns a boolean value indicating whether the accessible at a given (row, column) is selected. |
void |
Track changes to selection model, column model, etc. |
void |
removeAccessibleSelection(int i) Removes the specified child of the object from the object's selection. |
void |
Causes every child of the object to be selected, but only if the JTable supports multiple selections,
and if individual cell selection is enabled.
|
void |
Sets the caption for the table. |
void |
setAccessibleColumnDescription(int c, Accessible a) Sets the description text of the specified column of the table. |
void |
Sets the column headers as an AccessibleTable .
|
void |
setAccessibleRowDescription(int r, Accessible a) Sets the description text of the specified row of the table. |
void |
Sets the row headers as an AccessibleTable .
|
void |
Sets the summary description of the table. |
void |
Track changes to the table contents |
void |
Track changes to the table contents (row deletions) |
void |
Track changes to the table contents (row insertions) |
void |
Track changes to table cell selections |
Methods inherited from class java.awt.Container.AccessibleAWTContainer |
---|
addPropertyChangeListener, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected JTable.AccessibleJTable()
Method Detail |
---|
public void addAccessibleSelection(int i)
Accessible
child of the
object to the object's selection. If the object supports
multiple selections, the specified child is added to
any existing selection, otherwise
it replaces any existing selection in the object. If the
specified child is already selected, this method has no effect.
This method only works on JTable
s which have
individual cell selection enabled.
i
- the zero-based index of the childpublic void clearAccessibleSelection()
public void columnAdded(TableColumnModelEvent e)
e
public void columnMarginChanged(ChangeEvent e)
e
public void columnMoved(TableColumnModelEvent e)
e
public void columnRemoved(TableColumnModelEvent e)
e
public void columnSelectionChanged(ListSelectionEvent e)
e
public void editingCanceled(ChangeEvent e)
e
public void editingStopped(ChangeEvent e)
e
public Accessible getAccessibleAt(int r, int c)
r
c
public Accessible getAccessibleAt(Point p)
Accessible
child, if one exists,
contained at the local coordinate Point
.
getAccessibleAt
in class Container.AccessibleAWTContainer
p
- the point defining the top-left corner of the
Accessible
, given in the coordinate space
of the object's parentAccessible
, if it exists,
at the specified location; else null
public Accessible getAccessibleCaption()
public Accessible getAccessibleChild(int i)
Accessible
child of the object.
getAccessibleChild
in class JComponent.AccessibleJComponent
i
- zero-based index of childpublic int getAccessibleChildrenCount()
Accessible
,
then this method should return the number of children of this object.
getAccessibleChildrenCount
in class JComponent.AccessibleJComponent
public int getAccessibleColumn(int index)
index
- the zero-based index in the tablepublic int getAccessibleColumnAtIndex(int i)
i
- zero-based index into the tablepublic int getAccessibleColumnCount()
public Accessible getAccessibleColumnDescription(int c)
c
- zero-based column of the tablepublic int getAccessibleColumnExtentAt(int r, int c)
Accessible
at a given (row, column).
r
c
Accessible
at a specified row and column in the tablepublic AccessibleTable getAccessibleColumnHeader()
AccessibleTable
.
AccessibleTable
representing the column
headers, or null
if the table header is
null
public int getAccessibleIndex(int r, int c)
r
- zero-based row of the tablec
- zero-based column of the tablepublic int getAccessibleIndexAt(int r, int c)
r
- zero-based row of the tablec
- zero-based column of the tablepublic AccessibleRole getAccessibleRole()
getAccessibleRole
in class JComponent.AccessibleJComponent
public int getAccessibleRow(int index)
index
- the zero-based index in the tablepublic int getAccessibleRowAtIndex(int i)
i
- zero-based index into the tablepublic int getAccessibleRowCount()
public Accessible getAccessibleRowDescription(int r)
r
- zero-based row of the tablepublic int getAccessibleRowExtentAt(int r, int c)
Accessible
at a specified row and column in the table.
r
c
Accessible
at a specified row and column in the tablepublic AccessibleTable getAccessibleRowHeader()
AccessibleTable
.
AccessibleTable
representing the row
headerspublic AccessibleSelection getAccessibleSelection()
getAccessibleSelection
in class AccessibleContext
public Accessible getAccessibleSelection(int i)
Accessible
representing the
specified selected child in the object. If there
isn't a selection, or there are fewer children selected
than the integer passed in, the return
value will be null
.
Note that the index represents the i-th selected child, which is different from the i-th child.
i
- the zero-based index of selected childrenpublic int getAccessibleSelectionCount()
Accessible
children
currently selected.
If no children are selected, the return value will be 0.
public Accessible getAccessibleSummary()
public AccessibleTable getAccessibleTable()
AccessibleTable
associated with this
object. In the implementation of the Java Accessibility
API for this class, return this object, which is responsible
for implementing the AccessibleTables
interface
on behalf of itself.
getAccessibleTable
in class AccessibleContext
public int[] getSelectedAccessibleColumns()
public int[] getSelectedAccessibleRows()
public boolean isAccessibleChildSelected(int i)
i
- the zero-based index of the child in this
Accessible
objectpublic boolean isAccessibleColumnSelected(int c)
c
- zero-based column of the tablepublic boolean isAccessibleRowSelected(int r)
r
- zero-based row of the tablepublic boolean isAccessibleSelected(int r, int c)
r
- zero-based row of the tablec
- zero-based column of the tablepublic void propertyChange(PropertyChangeEvent e)
e
public void removeAccessibleSelection(int i)
This method only works on JTables
which have
individual cell selection enabled.
i
- the zero-based index of the childpublic void selectAllAccessibleSelection()
JTable
supports multiple selections,
and if individual cell selection is enabled.
public void setAccessibleCaption(Accessible a)
a
- the caption for the tablepublic void setAccessibleColumnDescription(int c, Accessible a)
c
- zero-based column of the tablea
- the description of the columnpublic void setAccessibleColumnHeader(AccessibleTable a)
AccessibleTable
.
a
- an AccessibleTable
representing the
column headerspublic void setAccessibleRowDescription(int r, Accessible a)
r
- zero-based row of the tablea
- the description of the rowpublic void setAccessibleRowHeader(AccessibleTable a)
AccessibleTable
.
a
- an AccessibleTable
representing the row
headerspublic void setAccessibleSummary(Accessible a)
a
- the summary description of the tablepublic void tableChanged(TableModelEvent e)
e
public void tableRowsDeleted(TableModelEvent e)
e
public void tableRowsInserted(TableModelEvent e)
e
public void valueChanged(ListSelectionEvent e)
e
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |