public interface AccessibleHypertext extends AccessibleText
的accessiblehypertext类是所有类的基类显示目前的超文本信息。这个类提供了一种辅助技术的标准机制,通过它的内容、属性和空间位置来访问文本。它还提供了操纵超链接的标准机制。应用程序可以确定一个对象是否支持accessiblehypertext界面首先获得其accessiblecontext(见Accessible
)然后调用的方法accessiblecontext AccessibleContext.getAccessibleText()
。如果返回值是一个类,延伸accessiblehypertext,那么对象支持accessiblehypertext。
CHARACTER, SENTENCE, WORD
Modifier and Type | Method and Description |
---|---|
AccessibleHyperlink |
getLink(int linkIndex)
返回该超文本文档的第n个链接。
|
int |
getLinkCount()
返回此超文本文档中的链接数。
|
int |
getLinkIndex(int charIndex)
将该索引返回到与此字符索引关联的超链接数组,或-如果没有与此索引相关联的超链接,则- 1。
|
getAfterIndex, getAtIndex, getBeforeIndex, getCaretPosition, getCharacterAttribute, getCharacterBounds, getCharCount, getIndexAtPoint, getSelectedText, getSelectionEnd, getSelectionStart
int getLinkCount()
AccessibleHyperlink getLink(int linkIndex)
linkIndex
-在这个超文本链接
int getLinkIndex(int charIndex)
charIndex
指数内的文本
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.