protected class TextComponent.AccessibleAWTTextComponent extends Component.AccessibleAWTComponent implements AccessibleText, TextListener
TextComponent
类的辅助功能支持。
它提供了适用于文本组件用户界面元素的Java Accessibility API的实现。
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 |
---|
AccessibleAWTTextComponent()
构造一个AccessibleAWTTextComponent。
|
Modifier and Type | Method and Description |
---|---|
AccessibleRole |
getAccessibleRole()
获得此对象的作用。
|
AccessibleStateSet |
getAccessibleStateSet()
获取TextComponent的状态集。
|
AccessibleText |
getAccessibleText()
获取与此对象关联的AccessibleText。
|
String |
getAfterIndex(int part, int index)
返回给定索引后的String。
|
String |
getAtIndex(int part, int index)
返回给定索引处的String。
|
String |
getBeforeIndex(int part, int index)
返回给定索引之前的String。
|
int |
getCaretPosition()
返回插入符号的从零开始的偏移量。
|
AttributeSet |
getCharacterAttribute(int i)
返回给定字符的AttributeSet(在给定索引处)。
|
Rectangle |
getCharacterBounds(int i)
将给定索引处的字符的边框确定为字符串。
|
int |
getCharCount()
返回字符数(有效指标)
|
int |
getIndexAtPoint(Point p)
给定本地坐标点,返回该点下的字符从零开始的索引。
|
String |
getSelectedText()
返回所选文本的部分。
|
int |
getSelectionEnd()
返回所选文本中的结束偏移量。
|
int |
getSelectionStart()
返回所选文本中的起始偏移量。
|
void |
textValueChanged(TextEvent textEvent)
TextListener通知文本值更改。
|
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 AccessibleAWTTextComponent()
public void textValueChanged(TextEvent textEvent)
textValueChanged
在界面
TextListener
public AccessibleStateSet getAccessibleStateSet()
getAccessibleStateSet
在类别
Component.AccessibleAWTComponent
AccessibleStateSet
, AccessibleState
, Component.AccessibleAWTComponent.addPropertyChangeListener(java.beans.PropertyChangeListener)
public AccessibleRole getAccessibleRole()
getAccessibleRole
在类别
Component.AccessibleAWTComponent
AccessibleRole
public AccessibleText getAccessibleText()
getAccessibleText
在类别
AccessibleContext
AccessibleText
public int getIndexAtPoint(Point p)
getIndexAtPoint
在界面
AccessibleText
p
- 本地坐标点
public Rectangle getCharacterBounds(int i)
getCharacterBounds
在界面
AccessibleText
i
- 索引到String> = 0
public int getCharCount()
getCharCount
在界面
AccessibleText
public int getCaretPosition()
getCaretPosition
在界面
AccessibleText
public AttributeSet getCharacterAttribute(int i)
getCharacterAttribute
在界面
AccessibleText
i
- 从零开始的索引进入文本
public int getSelectionStart()
getSelectionStart
在界面
AccessibleText
public int getSelectionEnd()
getSelectionEnd
在界面
AccessibleText
public String getSelectedText()
getSelectedText
在界面
AccessibleText
public String getAtIndex(int part, int index)
getAtIndex
在界面
AccessibleText
part
- 要检索的AccessibleText.CHARACTER,AccessibleText.WORD或AccessibleText.SENTENCE
index
- 文本中的索引> = 0
public String getAfterIndex(int part, int index)
getAfterIndex
在界面
AccessibleText
part
- 要检索的AccessibleText.CHARACTER,AccessibleText.WORD或AccessibleText.SENTENCE
index
- 文本中的索引> = 0
public String getBeforeIndex(int part, int index)
getBeforeIndex
在界面
AccessibleText
part
- 要检索的AccessibleText.CHARACTER,AccessibleText.WORD或AccessibleText.SENTENCE
index
- 文本中的索引> = 0
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.