class. It provides an implementation of the
Java Accessibility API appropriate to list user-interface elements.
Method from java.awt.List$AccessibleAWTList Detail: |
public void actionPerformed(ActionEvent event) {
}
|
public void addAccessibleSelection(int i) {
List.this.select(i);
}
Adds the specified selected item in the object to the object's
selection. If the object supports multiple selections,
the specified item is added to any existing selection, otherwise
it replaces any existing selection in the object. If the
specified item is already selected, this method has no effect. |
public void clearAccessibleSelection() {
synchronized(List.this) {
int selectedIndexes[] = List.this.getSelectedIndexes();
if (selectedIndexes == null)
return;
for (int i = selectedIndexes.length - 1; i >= 0; i--) {
List.this.deselect(selectedIndexes[i]);
}
}
}
Clears the selection in the object, so that nothing in the
object is selected. |
public Accessible getAccessibleAt(Point p) {
return null; // fredxFIXME Not implemented yet
}
Returns the Accessible child contained at the local coordinate
Point, if one exists. |
public Accessible getAccessibleChild(int i) {
synchronized(List.this) {
if (i >= List.this.getItemCount()) {
return null;
} else {
return new AccessibleAWTListChild(List.this, i);
}
}
}
Return the nth Accessible child of the object. |
public int getAccessibleChildrenCount() {
return List.this.getItemCount();
}
Returns the number of accessible children in the object. If all
of the children of this object implement Accessible, than this
method should return the number of children of this object. |
public AccessibleRole getAccessibleRole() {
return AccessibleRole.LIST;
}
Get the role of this object. |
public AccessibleSelection getAccessibleSelection() {
return this;
}
Get the AccessibleSelection associated with this object. In the
implementation of the Java Accessibility API for this class,
return this object, which is responsible for implementing the
AccessibleSelection interface on behalf of itself. |
public Accessible getAccessibleSelection(int i) {
synchronized(List.this) {
int len = getAccessibleSelectionCount();
if (i < 0 || i >= len) {
return null;
} else {
return getAccessibleChild(List.this.getSelectedIndexes()[i]);
}
}
}
Returns an Accessible representing the specified selected item
in the object. If there isn't a selection, or there are
fewer items selected than the integer passed in, the return
value will be null. |
public int getAccessibleSelectionCount() {
return List.this.getSelectedIndexes().length;
}
Returns the number of items currently selected.
If no items are selected, the return value will be 0. |
public AccessibleStateSet getAccessibleStateSet() {
AccessibleStateSet states = super.getAccessibleStateSet();
if (List.this.isMultipleMode()) {
states.add(AccessibleState.MULTISELECTABLE);
}
return states;
}
Get the state set of this object. |
public boolean isAccessibleChildSelected(int i) {
return List.this.isIndexSelected(i);
}
Returns true if the current child of this object is selected. |
public void itemStateChanged(ItemEvent event) {
}
|
public void removeAccessibleSelection(int i) {
List.this.deselect(i);
}
Removes the specified selected item in the object from the object's
selection. If the specified item isn't currently selected, this
method has no effect. |
public void selectAllAccessibleSelection() {
synchronized(List.this) {
for (int i = List.this.getItemCount() - 1; i >= 0; i--) {
List.this.select(i);
}
}
}
Causes every selected item in the object to be selected
if the object supports multiple selections. |