protected abstract class AbstractButton.AccessibleAbstractButton extends JComponent.AccessibleJComponent implements AccessibleAction, AccessibleValue, AccessibleText
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandlerComponent.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandleraccessibleContainerHandler, accessibleFocusHandleraccessibleAWTComponentHandler, accessibleAWTFocusHandlerACCESSIBLE_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, accessibleParentCLICK, DECREMENT, INCREMENT, TOGGLE_EXPAND, TOGGLE_POPUPCHARACTER, SENTENCE, WORD| Modifier | Constructor and Description |
|---|---|
protected |
AbstractButton.AccessibleAbstractButton() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
doAccessibleAction(int actionIndex)
Performs the acccessible action with the specified index on this object.
|
AccessibleAction |
getAccessibleAction()
Returns the accessible action associated with this object.
|
int |
getAccessibleActionCount()
Returns the number of accessible actions that are supported by this
object.
|
String |
getAccessibleActionDescription(int actionIndex)
Returns a description for the action with the specified index or
null if such action does not exist. |
AccessibleIcon[] |
getAccessibleIcon()
Returns the accessible icons of this object.
|
String |
getAccessibleName()
Returns the accessible name for the button.
|
AccessibleRelationSet |
getAccessibleRelationSet()
Returns the accessible relations of this AccessibleAbstractButton.
|
AccessibleStateSet |
getAccessibleStateSet()
Returns the accessible state set of this object.
|
AccessibleText |
getAccessibleText()
Returns the accessible text for this AccessibleAbstractButton.
|
AccessibleValue |
getAccessibleValue()
Returns the accessible value of this AccessibleAbstractButton, which
is always
this. |
String |
getAfterIndex(int part,
int index)
Returns the character, word or sentence after the specified index.
|
String |
getAtIndex(int part,
int index)
Returns the character, word or sentence at the specified index.
|
String |
getBeforeIndex(int part,
int index)
Returns the character, word or sentence before the specified index.
|
int |
getCaretPosition()
This always returns
-1 since there is no caret in a button. |
AttributeSet |
getCharacterAttribute(int i)
Returns the text attribute for the character at the specified character
index.
|
Rectangle |
getCharacterBounds(int i)
Returns the bounds of the character at the specified index of the
button's label.
|
int |
getCharCount()
Returns the number of characters in the button's label.
|
Number |
getCurrentAccessibleValue()
Returns the current value of this object as a number.
|
int |
getIndexAtPoint(Point p)
Returns the index of the label's character at the specified point,
relative to the local bounds of the button.
|
Number |
getMaximumAccessibleValue()
Returns the maximum accessible value for the AccessibleAbstractButton,
which is
1. |
Number |
getMinimumAccessibleValue()
Returns the minimum accessible value for the AccessibleAbstractButton,
which is
0. |
String |
getSelectedText()
Returns the selected text.
|
int |
getSelectionEnd()
This always returns
-1 since
button labels can't be selected. |
int |
getSelectionStart()
This always returns
-1 since
button labels can't be selected. |
boolean |
setCurrentAccessibleValue(Number value)
Sets the current accessible value as object.
|
addPropertyChangeListener, getAccessibleChild, getAccessibleChildrenCount, getAccessibleDescription, getAccessibleKeyBinding, getAccessibleRole, getBorderTitle, getTitledBorderText, getToolTipText, removePropertyChangeListenergetAccessibleAtaddFocusListener, 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, setVisiblefirePropertyChange, getAccessibleEditableText, getAccessibleSelection, getAccessibleTable, setAccessibleDescription, setAccessibleName, setAccessibleParentclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddFocusListener, 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, setVisibleprotected AbstractButton.AccessibleAbstractButton()
public AccessibleStateSet getAccessibleStateSet()
AccessibleAbstractButton
supports the following states: AccessibleState.ARMED,
AccessibleState.FOCUSED, AccessibleState.PRESSED and
AccessibleState.CHECKED.getAccessibleStateSet in class JComponent.AccessibleJComponentAccessibleStatepublic String getAccessibleName()
getAccessibleName in class JComponent.AccessibleJComponentnull if this
object has no nameAccessibleContext.setAccessibleName(String)public AccessibleIcon[] getAccessibleIcon()
null.getAccessibleIcon in class AccessibleContextnull if
there is no accessible iconAccessibleIconpublic AccessibleRelationSet getAccessibleRelationSet()
getAccessibleRelationSet in class AccessibleContextAccessibleRelationSetpublic AccessibleAction getAccessibleAction()
this.getAccessibleAction in class AccessibleContextthisAccessibleActionpublic AccessibleValue getAccessibleValue()
this.getAccessibleValue in class AccessibleContextthisAccessibleValuepublic int getAccessibleActionCount()
1.getAccessibleActionCount in interface AccessibleAction1, the number of supported accessible actionspublic String getAccessibleActionDescription(int actionIndex)
null if such action does not exist.getAccessibleActionDescription in interface AccessibleActionactionIndex - the zero based index to the actionsnull if such action does not existpublic boolean doAccessibleAction(int actionIndex)
0 and nothing otherwise.doAccessibleAction in interface AccessibleActionactionIndex - a zero based index into the actions of this buttontrue if the specified action has been performed
successfully, false otherwisepublic Number getCurrentAccessibleValue()
Integer(1) if the button is
selected, Integer(0) if the button is not selected.getCurrentAccessibleValue in interface AccessibleValueAccessibleValue.setCurrentAccessibleValue(Number)public boolean setCurrentAccessibleValue(Number value)
setCurrentAccessibleValue in interface AccessibleValuevalue - 0 for deselected button, other for selected buttontrue if the value has been set, false
otherwisepublic Number getMinimumAccessibleValue()
0.getMinimumAccessibleValue in interface AccessibleValue0AccessibleValue.getMaximumAccessibleValue()public Number getMaximumAccessibleValue()
1.getMaximumAccessibleValue in interface AccessibleValue1AccessibleValue.getMinimumAccessibleValue()public AccessibleText getAccessibleText()
null if the button has a non-HTML label, otherwise
this.getAccessibleText in class AccessibleContextAccessibleTextpublic int getIndexAtPoint(Point p)
getIndexAtPoint in interface AccessibleTextp - the point, relative to the buttons local boundspublic Rectangle getCharacterBounds(int i)
getCharacterBounds in interface AccessibleTexti - the index of the character of the labelpublic int getCharCount()
getCharCount in interface AccessibleTextpublic int getCaretPosition()
-1 since there is no caret in a button.getCaretPosition in interface AccessibleText-1 since there is no caret in a buttonpublic String getAtIndex(int part, int index)
part parameter determines what is returned, the character,
word or sentence after the index.getAtIndex in interface AccessibleTextpart - one of AccessibleText.CHARACTER,
AccessibleText.WORD or
AccessibleText.SENTENCE, specifying what is returnedindex - the indexindexpublic String getAfterIndex(int part, int index)
part parameter determines what is returned, the character,
word or sentence after the index.getAfterIndex in interface AccessibleTextpart - one of AccessibleText.CHARACTER,
AccessibleText.WORD or
AccessibleText.SENTENCE, specifying what is returnedindex - the indexindexpublic String getBeforeIndex(int part, int index)
part parameter determines what is returned, the character,
word or sentence before the index.getBeforeIndex in interface AccessibleTextpart - one of AccessibleText.CHARACTER,
AccessibleText.WORD or
AccessibleText.SENTENCE, specifying what is returnedindex - the indexindexpublic AttributeSet getCharacterAttribute(int i)
getCharacterAttribute in interface AccessibleTexti - the character indexnull if the character has no attributespublic int getSelectionStart()
-1 since
button labels can't be selected.getSelectionStart in interface AccessibleText-1, button labels can't be selectedpublic int getSelectionEnd()
-1 since
button labels can't be selected.getSelectionEnd in interface AccessibleText-1, button labels can't be selectedpublic String getSelectedText()
null since
button labels can't be selected.getSelectedText in interface AccessibleTextnull, button labels can't be selected