javax.swing

Class JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink

public class JEditorPane.JEditorPaneAccessibleHypertextSupport.HTMLLink extends AccessibleHyperlink

The accessible representation of a HTML link.
Constructor Summary
HTMLLink(Element el)
Creates a new HTMLLink.
Method Summary
booleandoAccessibleAction(int i)
Performs the specified action on the link object.
ObjectgetAccessibleActionAnchor(int i)
Returns an object that represents the link anchor.
intgetAccessibleActionCount()
Returns the number of AccessibleActions in this link object.
StringgetAccessibleActionDescription(int i)
Returns the description of the action at action index i.
ObjectgetAccessibleActionObject(int i)
Returns an {@link URL} object, that represents the action at action index i.
intgetEndIndex()
Returns the end index of the hyperlink element.
intgetStartIndex()
Returns the start index of the hyperlink element.
booleanisValid()
Returns true if this HTMLLink is still valid.

Constructor Detail

HTMLLink

public HTMLLink(Element el)
Creates a new HTMLLink.

Parameters: el the link element

Method Detail

doAccessibleAction

public boolean doAccessibleAction(int i)
Performs the specified action on the link object. This ususally means activating the link.

Returns: true if the action has been performed successfully, false otherwise

getAccessibleActionAnchor

public Object getAccessibleActionAnchor(int i)
Returns an object that represents the link anchor. For examples, if the link encloses a string, then a String object is returned, if the link encloses an <img> tag, then an ImageIcon object is returned.

Returns: an object that represents the link anchor

getAccessibleActionCount

public int getAccessibleActionCount()
Returns the number of AccessibleActions in this link object. In general, link have 1 AccessibleAction associated with them. There are special cases where links can have multiple actions associated, like in image maps.

Returns: the number of AccessibleActions in this link object

getAccessibleActionDescription

public String getAccessibleActionDescription(int i)
Returns the description of the action at action index i. This method returns the text within the element associated with this link.

Parameters: i the action index

Returns: the description of the action at action index i

getAccessibleActionObject

public Object getAccessibleActionObject(int i)
Returns an {@link URL} object, that represents the action at action index i.

Parameters: i the action index

Returns: an {@link URL} object, that represents the action at action index i

getEndIndex

public int getEndIndex()
Returns the end index of the hyperlink element.

Returns: the end index of the hyperlink element

getStartIndex

public int getStartIndex()
Returns the start index of the hyperlink element.

Returns: the start index of the hyperlink element

isValid

public boolean isValid()
Returns true if this HTMLLink is still valid. A HTMLLink can become invalid when the document changes.

Returns: true if this HTMLLink is still valid