javax.swing
Class JEditorPane.JEditorPaneAccessibleHypertextSupport
java.lang.Object
javax.accessibility.AccessibleContext
java.awt.Component.AccessibleAWTComponent
java.awt.Container.AccessibleAWTContainer
javax.swing.JComponent.AccessibleJComponent
javax.swing.text.JTextComponent.AccessibleJTextComponent
javax.swing.JEditorPane.AccessibleJEditorPane
javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport
- All Implemented Interfaces:
- Serializable, EventListener, AccessibleAction, AccessibleComponent, AccessibleEditableText, AccessibleExtendedComponent, AccessibleHypertext, AccessibleText, CaretListener, DocumentListener
- Enclosing class:
- JEditorPane
protected class JEditorPane.JEditorPaneAccessibleHypertextSupport
- extends JEditorPane.AccessibleJEditorPane
- implements AccessibleHypertext
This is the accessible text that is returned by
JEditorPane.AccessibleJEditorPaneHTML.getAccessibleText()
.
- See Also:
- Serialized Form
Fields inherited from class javax.accessibility.AccessibleContext |
ACCESSIBLE_ACTION_PROPERTY, ACCESSIBLE_ACTIVE_DESCENDANT_PROPERTY, ACCESSIBLE_CARET_PROPERTY, ACCESSIBLE_CHILD_PROPERTY, ACCESSIBLE_COMPONENT_BOUNDS_CHANGED, ACCESSIBLE_DESCRIPTION_PROPERTY, ACCESSIBLE_HYPERTEXT_OFFSET, ACCESSIBLE_INVALIDATE_CHILDREN, ACCESSIBLE_NAME_PROPERTY, ACCESSIBLE_SELECTION_PROPERTY, ACCESSIBLE_STATE_PROPERTY, ACCESSIBLE_TABLE_CAPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_COLUMN_HEADER_CHANGED, ACCESSIBLE_TABLE_MODEL_CHANGED, ACCESSIBLE_TABLE_ROW_DESCRIPTION_CHANGED, ACCESSIBLE_TABLE_ROW_HEADER_CHANGED, ACCESSIBLE_TABLE_SUMMARY_CHANGED, ACCESSIBLE_TEXT_ATTRIBUTES_CHANGED, ACCESSIBLE_TEXT_PROPERTY, ACCESSIBLE_VALUE_PROPERTY, ACCESSIBLE_VISIBLE_DATA_PROPERTY, accessibleDescription, accessibleName, accessibleParent |
Method Summary |
AccessibleHyperlink |
getLink(int i)
Returns the i -th hyperlink in the document or
null if there is no hyperlink with the specified index. |
int |
getLinkCount()
Returns the number of hyperlinks in the document. |
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. |
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. |
Methods inherited from class javax.swing.text.JTextComponent.AccessibleJTextComponent |
caretUpdate, changedUpdate, cut, delete, doAccessibleAction, getAccessibleActionCount, getAccessibleActionDescription, getAccessibleEditableText, getAccessibleRole, getAccessibleText, getAfterIndex, getAtIndex, getBeforeIndex, getCaretPosition, getCharacterAttribute, getCharacterBounds, getCharCount, getIndexAtPoint, getSelectedText, getSelectionEnd, getSelectionStart, getTextRange, insertTextAtIndex, insertUpdate, paste, removeUpdate, replaceText, selectText, setAttributes, setTextContents |
Methods inherited from class java.awt.Component.AccessibleAWTComponent |
addFocusListener, contains, getAccessibleComponent, getAccessibleIndexInParent, getAccessibleParent, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocale, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.accessibility.AccessibleText |
getAfterIndex, getAtIndex, getBeforeIndex, getCaretPosition, getCharacterAttribute, getCharacterBounds, getCharCount, getIndexAtPoint, getSelectedText, getSelectionEnd, getSelectionStart |
Methods inherited from interface javax.accessibility.AccessibleComponent |
addFocusListener, contains, getAccessibleAt, getBackground, getBounds, getCursor, getFont, getFontMetrics, getForeground, getLocation, getLocationOnScreen, getSize, isEnabled, isFocusTraversable, isShowing, isVisible, removeFocusListener, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFont, setForeground, setLocation, setSize, setVisible |
JEditorPane.JEditorPaneAccessibleHypertextSupport
public JEditorPane.JEditorPaneAccessibleHypertextSupport()
- Creates a new JEditorPaneAccessibleHypertextSupport object.
getLinkCount
public int getLinkCount()
- Returns the number of hyperlinks in the document.
- Specified by:
getLinkCount
in interface AccessibleHypertext
- Returns:
- the number of hyperlinks in the document
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.
- Specified by:
getLink
in interface AccessibleHypertext
- 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
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.
- Specified by:
getLinkIndex
in interface AccessibleHypertext
- 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