protected abstract class AbstractButton.AccessibleAbstractButton extends JComponent.AccessibleJComponent implements AccessibleAction, AccessibleValue, AccessibleText
JComponent.AccessibleJComponent.AccessibleContainerHandler, JComponent.AccessibleJComponent.AccessibleFocusHandler
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
accessibleContainerHandler, accessibleFocusHandler
accessibleAWTComponentHandler, accessibleAWTFocusHandler
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
CLICK, DECREMENT, INCREMENT, TOGGLE_EXPAND, TOGGLE_POPUP
CHARACTER, 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, removePropertyChangeListener
getAccessibleAt
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
firePropertyChange, getAccessibleEditableText, getAccessibleSelection, getAccessibleTable, setAccessibleDescription, setAccessibleName, setAccessibleParent
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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
protected AbstractButton.AccessibleAbstractButton()
public AccessibleStateSet getAccessibleStateSet()
AccessibleAbstractButton
supports the following states: AccessibleState.ARMED
,
AccessibleState.FOCUSED
, AccessibleState.PRESSED
and
AccessibleState.CHECKED
.getAccessibleStateSet
in class JComponent.AccessibleJComponent
AccessibleState
public String getAccessibleName()
getAccessibleName
in class JComponent.AccessibleJComponent
null
if this
object has no nameAccessibleContext.setAccessibleName(String)
public AccessibleIcon[] getAccessibleIcon()
null
.getAccessibleIcon
in class AccessibleContext
null
if
there is no accessible iconAccessibleIcon
public AccessibleRelationSet getAccessibleRelationSet()
getAccessibleRelationSet
in class AccessibleContext
AccessibleRelationSet
public AccessibleAction getAccessibleAction()
this
.getAccessibleAction
in class AccessibleContext
this
AccessibleAction
public AccessibleValue getAccessibleValue()
this
.getAccessibleValue
in class AccessibleContext
this
AccessibleValue
public int getAccessibleActionCount()
1
.getAccessibleActionCount
in interface AccessibleAction
1
, the number of supported accessible actionspublic String getAccessibleActionDescription(int actionIndex)
null
if such action does not exist.getAccessibleActionDescription
in interface AccessibleAction
actionIndex
- the zero based index to the actionsnull
if such action does not existpublic boolean doAccessibleAction(int actionIndex)
0
and nothing otherwise.doAccessibleAction
in interface AccessibleAction
actionIndex
- 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 AccessibleValue
AccessibleValue.setCurrentAccessibleValue(Number)
public boolean setCurrentAccessibleValue(Number value)
setCurrentAccessibleValue
in interface AccessibleValue
value
- 0 for deselected button, other for selected buttontrue
if the value has been set, false
otherwisepublic Number getMinimumAccessibleValue()
0
.getMinimumAccessibleValue
in interface AccessibleValue
0
AccessibleValue.getMaximumAccessibleValue()
public Number getMaximumAccessibleValue()
1
.getMaximumAccessibleValue
in interface AccessibleValue
1
AccessibleValue.getMinimumAccessibleValue()
public AccessibleText getAccessibleText()
null
if the button has a non-HTML label, otherwise
this
.getAccessibleText
in class AccessibleContext
AccessibleText
public int getIndexAtPoint(Point p)
getIndexAtPoint
in interface AccessibleText
p
- the point, relative to the buttons local boundspublic Rectangle getCharacterBounds(int i)
getCharacterBounds
in interface AccessibleText
i
- the index of the character of the labelpublic int getCharCount()
getCharCount
in interface AccessibleText
public 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 AccessibleText
part
- one of AccessibleText.CHARACTER
,
AccessibleText.WORD
or
AccessibleText.SENTENCE
, specifying what is returnedindex
- the indexindex
public String getAfterIndex(int part, int index)
part
parameter determines what is returned, the character,
word or sentence after the index.getAfterIndex
in interface AccessibleText
part
- one of AccessibleText.CHARACTER
,
AccessibleText.WORD
or
AccessibleText.SENTENCE
, specifying what is returnedindex
- the indexindex
public String getBeforeIndex(int part, int index)
part
parameter determines what is returned, the character,
word or sentence before the index.getBeforeIndex
in interface AccessibleText
part
- one of AccessibleText.CHARACTER
,
AccessibleText.WORD
or
AccessibleText.SENTENCE
, specifying what is returnedindex
- the indexindex
public AttributeSet getCharacterAttribute(int i)
getCharacterAttribute
in interface AccessibleText
i
- 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 AccessibleText
null
, button labels can't be selected