javax.swing

Class JEditorPane.JEditorPaneAccessibleHypertextSupport

protected class JEditorPane.JEditorPaneAccessibleHypertextSupport extends JEditorPane.AccessibleJEditorPane implements AccessibleHypertext

This is the accessible text that is returned by {@link AccessibleJEditorPaneHTML#getAccessibleText()}.
Nested Class Summary
classJEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink
The accessible representation of a HTML link.
Constructor Summary
JEditorPaneAccessibleHypertextSupport()
Creates a new JEditorPaneAccessibleHypertextSupport object.
Method Summary
AccessibleHyperlinkgetLink(int i)
Returns the i-th hyperlink in the document or null if there is no hyperlink with the specified index.
intgetLinkCount()
Returns the number of hyperlinks in the document.
intgetLinkIndex(int c)
Returns the index of the link element at the character position c within the document, or -1 if there is no link at the specified position.
StringgetLinkText(int i)
Returns the link text of the link at index i, or null, if there is no link at the specified position.

Constructor Detail

JEditorPaneAccessibleHypertextSupport

public JEditorPaneAccessibleHypertextSupport()
Creates a new JEditorPaneAccessibleHypertextSupport object.

Method Detail

getLink

public AccessibleHyperlink getLink(int i)
Returns the i-th hyperlink in the document or null if there is no hyperlink with the specified index.

Parameters: i the index of the hyperlink to return

Returns: the i-th hyperlink in the document or null if there is no hyperlink with the specified index

getLinkCount

public int getLinkCount()
Returns the number of hyperlinks in the document.

Returns: the number of hyperlinks in the document

getLinkIndex

public int getLinkIndex(int c)
Returns the index of the link element at the character position c within the document, or -1 if there is no link at the specified position.

Parameters: c the character index from which to fetch the link index

Returns: the index of the link element at the character position c within the document, or -1 if there is no link at the specified position

getLinkText

public String getLinkText(int i)
Returns the link text of the link at index i, or null, if there is no link at the specified position.

Parameters: i the index of the link

Returns: the link text of the link at index i, or null, if there is no link at the specified position