protected class TextComponent.AccessibleAWTTextComponent extends Component.AccessibleAWTComponent implements AccessibleText, TextListener
Component.AccessibleAWTComponent.AccessibleAWTComponentHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler
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
CHARACTER, SENTENCE, WORD
Constructor and Description |
---|
TextComponent.AccessibleAWTTextComponent() |
Modifier and Type | Method and Description |
---|---|
AccessibleRole |
getAccessibleRole()
Returns the role of this component.
|
AccessibleStateSet |
getAccessibleStateSet()
Returns a state set describing this component's state.
|
AccessibleText |
getAccessibleText()
Get any supported accessible text.
|
String |
getAfterIndex(int part,
int index)
Returns the section of text after the index, or null if the index or part
is invalid.
|
String |
getAtIndex(int part,
int index)
Returns the section of text at the index, or null if the index or part
is invalid.
|
String |
getBeforeIndex(int part,
int index)
Returns the section of text before the index, or null if the index or part
is invalid.
|
int |
getCaretPosition()
Return the offset of the character.
|
AttributeSet |
getCharacterAttribute(int index)
Returns the attributes of a character at an index, or null if the index
is out of bounds.
|
Rectangle |
getCharacterBounds(int index)
Determines the bounding box of the indexed character.
|
int |
getCharCount()
Return the number of characters.
|
int |
getIndexAtPoint(Point point)
Given a point in the coordinate system of this object, return the
0-based index of the character at that point, or -1 if there is none.
|
String |
getSelectedText()
Returns the selected text.
|
int |
getSelectionEnd()
Returns the end index of the selection.
|
int |
getSelectionStart()
Returns the start index of the selection.
|
void |
textValueChanged(TextEvent event)
This method is called when the text being monitored changes.
|
addFocusListener, addPropertyChangeListener, contains, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getAccessibleComponent, getAccessibleDescription, getAccessibleIndexInParent, getAccessibleName, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, removePropertyChangeListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible
firePropertyChange, getAccessibleAction, getAccessibleEditableText, getAccessibleIcon, getAccessibleRelationSet, getAccessibleSelection, getAccessibleTable, getAccessibleValue, setAccessibleDescription, setAccessibleName, setAccessibleParent
public TextComponent.AccessibleAWTTextComponent()
public AccessibleRole getAccessibleRole()
Component.AccessibleAWTComponent
getAccessibleRole
in class Component.AccessibleAWTComponent
AccessibleRole
public AccessibleStateSet getAccessibleStateSet()
Component.AccessibleAWTComponent
getAccessibleStateSet
in class Component.AccessibleAWTComponent
AccessibleState
public AccessibleText getAccessibleText()
AccessibleContext
getAccessibleText
in class AccessibleContext
AccessibleText
public int getIndexAtPoint(Point point)
AccessibleText
getIndexAtPoint
in interface AccessibleText
point
- the point to look atpublic Rectangle getCharacterBounds(int index)
AccessibleText
getCharacterBounds
in interface AccessibleText
index
- the 0-based character indexpublic int getCharCount()
AccessibleText
getCharCount
in interface AccessibleText
public int getCaretPosition()
AccessibleText
getCaretPosition
in interface AccessibleText
public String getAtIndex(int part, int index)
AccessibleText
getAtIndex
in interface AccessibleText
part
- AccessibleText.CHARACTER
, AccessibleText.WORD
, or AccessibleText.SENTENCE
index
- the 0-based character indexpublic String getAfterIndex(int part, int index)
AccessibleText
getAfterIndex
in interface AccessibleText
part
- AccessibleText.CHARACTER
, AccessibleText.WORD
, or AccessibleText.SENTENCE
index
- the 0-based character indexpublic String getBeforeIndex(int part, int index)
AccessibleText
getBeforeIndex
in interface AccessibleText
part
- AccessibleText.CHARACTER
, AccessibleText.WORD
, or AccessibleText.SENTENCE
index
- the 0-based character indexpublic AttributeSet getCharacterAttribute(int index)
AccessibleText
getCharacterAttribute
in interface AccessibleText
index
- the 0-based character indexpublic int getSelectionStart()
AccessibleText
getSelectionStart
in interface AccessibleText
public int getSelectionEnd()
AccessibleText
getSelectionEnd
in interface AccessibleText
public String getSelectedText()
AccessibleText
getSelectedText
in interface AccessibleText
public void textValueChanged(TextEvent event)
TextListener
textValueChanged
in interface TextListener
event
- the TextEvent
indicating the change