javax.accessibility
Interface AccessibleHypertext

All Superinterfaces:
AccessibleText
All Known Implementing Classes:
JEditorPane.JEditorPaneAccessibleHypertextSupport

public interface AccessibleHypertext
extends AccessibleText

Objects which present hyperlinks in a document should implement this interface. Accessibility software can use the implementations of this interface to aid the user in navigating the links.

The AccessibleContext.getAccessibleText() method should return an instance of this interface only when it is supported.

Since:
1.2
See Also:
Accessible, AccessibleContext, AccessibleText, AccessibleContext.getAccessibleText()

Field Summary
 
Fields inherited from interface javax.accessibility.AccessibleText
CHARACTER, SENTENCE, WORD
 
Method Summary
 AccessibleHyperlink getLink(int i)
          Returns link object denoted by the number i in this document, or null if i is out of bounds.
 int getLinkCount()
          Returns the number of links in the document, if any exist.
 int getLinkIndex(int c)
          Returns the link index for this character index if it resides within one of the hyperlinks of the document.
 
Methods inherited from interface javax.accessibility.AccessibleText
getAfterIndex, getAtIndex, getBeforeIndex, getCaretPosition, getCharacterAttribute, getCharacterBounds, getCharCount, getIndexAtPoint, getSelectedText, getSelectionEnd, getSelectionStart
 

Method Detail

getLinkCount

int getLinkCount()
Returns the number of links in the document, if any exist.

Returns:
the number of links, or -1

getLink

AccessibleHyperlink getLink(int i)
Returns link object denoted by the number i in this document, or null if i is out of bounds.

Parameters:
i - the ith hyperlink of the document
Returns:
link object denoted by i

getLinkIndex

int getLinkIndex(int c)
Returns the link index for this character index if it resides within one of the hyperlinks of the document. If no association exists at that character, or c is out of bounds, returns -1.

Parameters:
c - the character index
Returns:
the link index, or -1