Module java.desktop

Interface AccessibleHypertext

所有超级接口:
AccessibleText
所有已知实现类:
JEditorPane.JEditorPaneAccessibleHypertextSupport

public interface AccessibleHypertext extends AccessibleText
AccessibleHypertext类是在显示器上呈现超文本信息的所有类的基类。该类提供了辅助技术通过其内容、属性和空间位置访问该文本的标准机制。它还提供了操作超链接的标准机制。应用程序可以通过首先获取其AccessibleContext(参见Accessible)然后调用AccessibleContext.getAccessibleText()方法来确定对象是否支持AccessibleHypertext接口。如果返回值是一个扩展AccessibleHypertext的类,则该对象支持AccessibleHypertext
参见:
  • Method Details

    • getLinkCount

      int getLinkCount()
      返回此超文本文档中的链接数。
      返回:
      此超文本文档中的链接数
    • getLink

      AccessibleHyperlink getLink(int linkIndex)
      返回此超文本文档的第n个链接。
      参数:
      linkIndex - 在此超文本的链接中的索引
      返回:
      封装第n个链接的链接对象
    • getLinkIndex

      int getLinkIndex(int charIndex)
      返回与此字符索引关联的超链接数组中的索引,如果没有与此索引关联的超链接,则返回-1。
      参数:
      charIndex - 文本中的索引
      返回:
      此超文本文档的超链接集合中的索引