public interface

AccessibleExtendedText

javax.accessibility.AccessibleExtendedText
Known Indirect Subclasses

Class Overview

The AccessibleExtendedText interface contains additional methods not provided by the AccessibleText interface Applications can determine if an object supports the AccessibleExtendedText interface by first obtaining its AccessibleContext (see Accessible) and then calling the getAccessibleText() method of AccessibleContext. If the return value is an instance of AccessibleExtendedText, the object supports this interface.

Summary

Constants
int ATTRIBUTE_RUN Constant used to indicate that the part of the text that should be retrieved is contiguous text with the same text attributes.
int LINE Constant used to indicate that the part of the text that should be retrieved is a line of text.
Public Methods
abstract Rectangle getTextBounds(int startIndex, int endIndex)
Returns the bounding rectangle of the text between two indices.
abstract String getTextRange(int startIndex, int endIndex)
Returns the text between two indices
abstract AccessibleTextSequence getTextSequenceAfter(int part, int index)
Returns the AccessibleTextSequence after a given index.
abstract AccessibleTextSequence getTextSequenceAt(int part, int index)
Returns the AccessibleTextSequence at a given index.
abstract AccessibleTextSequence getTextSequenceBefore(int part, int index)
Returns the AccessibleTextSequence before a given index.

Constants

public static final int ATTRIBUTE_RUN

Constant used to indicate that the part of the text that should be retrieved is contiguous text with the same text attributes.

Constant Value: 5 (0x00000005)

public static final int LINE

Constant used to indicate that the part of the text that should be retrieved is a line of text.

Constant Value: 4 (0x00000004)

Public Methods

public abstract Rectangle getTextBounds (int startIndex, int endIndex)

Returns the bounding rectangle of the text between two indices.

Parameters
startIndex the start index in the text
endIndex the end index in the text
Returns
  • the bounding rectangle of the text if the indices are valid. Otherwise, null is returned.

public abstract String getTextRange (int startIndex, int endIndex)

Returns the text between two indices

Parameters
startIndex the start index in the text
endIndex the end index in the text
Returns
  • the text string if the indices are valid. Otherwise, null is returned.

public abstract AccessibleTextSequence getTextSequenceAfter (int part, int index)

Returns the AccessibleTextSequence after a given index.

Parameters
part the CHARACTER, WORD, SENTENCE, LINE or ATTRIBUTE_RUN to retrieve
index an index within the text
Returns
  • an AccessibleTextSequence specifying the text if part and index are valid. Otherwise, null is returned.

public abstract AccessibleTextSequence getTextSequenceAt (int part, int index)

Returns the AccessibleTextSequence at a given index.

Parameters
part the CHARACTER, WORD, SENTENCE, LINE or ATTRIBUTE_RUN to retrieve
index an index within the text
Returns
  • an AccessibleTextSequence specifying the text if part and index are valid. Otherwise, null is returned.

public abstract AccessibleTextSequence getTextSequenceBefore (int part, int index)

Returns the AccessibleTextSequence before a given index.

Parameters
part the CHARACTER, WORD, SENTENCE, LINE or ATTRIBUTE_RUN to retrieve
index an index within the text
Returns
  • an AccessibleTextSequence specifying the text if part and index are valid. Otherwise, null is returned.