Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
protected class JComboBox.AccessibleJComboBox
extends JComponent.AccessibleJComponent
implements AccessibleAction, AccessibleSelection
JComboBox
.
Nested Class Summary |
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 interface javax.accessibility.AccessibleAction | |
CLICK , DECREMENT , INCREMENT , TOGGLE_EXPAND , TOGGLE_POPUP |
Constructor Summary | |
Method Summary | |
void |
|
void |
|
boolean |
|
AccessibleAction |
|
int |
|
String |
|
Accessible |
|
int |
|
AccessibleRole |
|
AccessibleSelection |
|
Accessible |
|
int |
|
boolean |
|
void |
|
void |
|
Methods inherited from class java.awt.Container.AccessibleAWTContainer | |
getAccessibleAt , getAccessibleChild , getAccessibleChildrenCount |
Methods inherited from class java.lang.Object | |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
public void addAccessibleSelection(int index)
Sets the current selection to the specifiedindex
.
- Specified by:
- addAccessibleSelection in interface AccessibleSelection
- Parameters:
index
- the index to set as selection
public void clearAccessibleSelection()
Clears the current selection.
- Specified by:
- clearAccessibleSelection in interface AccessibleSelection
public boolean doAccessibleAction(int actionIndex)
Performs the accessible action with the specified index. AccessibleJComboBox has 1 accessible action (actionIndex == 0
), which is to toggle the popup menu. All other action indices have no effect and returnfalse
.
- Specified by:
- doAccessibleAction in interface AccessibleAction
- Parameters:
actionIndex
- the index of the action to perform
- Returns:
true
if the action has been performed,false
otherwise
public AccessibleAction getAccessibleAction()
Returns the accessible action associated to this accessible object. AccessibleJComboBox implements its own AccessibleAction, so this method returnsthis
.
- Overrides:
- getAccessibleAction in interface AccessibleContext
- Returns:
- the accessible action associated to this accessible object
public int getAccessibleActionCount()
Returns the number of accessible actions that can be performed by this object. AccessibleJComboBox implement s one accessible action (toggle the popup menu), so this method always returns1
.
- Specified by:
- getAccessibleActionCount in interface AccessibleAction
- Returns:
- the number of accessible actions that can be performed by this object
public String getAccessibleActionDescription(int actionIndex)
Returns the description of the specified action. AccessibleJComboBox implements 1 action (toggle the popup menu) and thus returnsUIManager.getString("ComboBox.togglePopupText")
- Specified by:
- getAccessibleActionDescription in interface AccessibleAction
- Parameters:
actionIndex
- the index of the action for which to return the description
- Returns:
- the description of the specified action
public Accessible getAccessibleChild(int index)
Returns the number of accessible children of this object. The implementation of AccessibleJComboBox delegates this call to the UI of the associated JComboBox.
- Overrides:
- getAccessibleChild in interface JComponent.AccessibleJComponent
- Parameters:
index
- the index of the accessible child to fetch
- Returns:
- the number of accessible children of this object
public int getAccessibleChildrenCount()
Returns the number of accessible children of this object. The implementation of AccessibleJComboBox delegates this call to the UI of the associated JComboBox.
- Overrides:
- getAccessibleChildrenCount in interface JComponent.AccessibleJComponent
- Returns:
- the number of accessible children of this object
public AccessibleRole getAccessibleRole()
Returns the accessible role for theJComboBox
component.
- Overrides:
- getAccessibleRole in interface JComponent.AccessibleJComponent
- Returns:
AccessibleRole.COMBO_BOX
.
public AccessibleSelection getAccessibleSelection()
Returns the AccessibleSelection object associated with this object. AccessibleJComboBoxes handle their selection themselves, so this always returnsthis
.
- Overrides:
- getAccessibleSelection in interface AccessibleContext
- Returns:
- the AccessibleSelection object associated with this object
public Accessible getAccessibleSelection(int index)
Returns the accessible selection from this AccssibleJComboBox.
- Specified by:
- getAccessibleSelection in interface AccessibleSelection
- Parameters:
index
- the index of the selected child to fetch
- Returns:
- the accessible selection from this AccssibleJComboBox
public int getAccessibleSelectionCount()
Returns the number of selected accessible children of this object. This returns1
if the combobox has a selected entry,0
otherwise.
- Specified by:
- getAccessibleSelectionCount in interface AccessibleSelection
- Returns:
- the number of selected accessible children of this object
public boolean isAccessibleChildSelected(int index)
Returnstrue
if the accessible child with the specifiedindex
is selected,false
otherwise.
- Specified by:
- isAccessibleChildSelected in interface AccessibleSelection
- Parameters:
index
- the index of the accessible child
- Returns:
true
if the accessible child with the specifiedindex
is selected,false
otherwise
public void removeAccessibleSelection(int index)
Removes the specified index from the current selection.
- Specified by:
- removeAccessibleSelection in interface AccessibleSelection
- Parameters:
index
- the index to remove from the selection
public void selectAllAccessibleSelection()
Multiple selection is not supported by AccessibleJComboBox, so this does nothing.
- Specified by:
- selectAllAccessibleSelection in interface AccessibleSelection