javax.accessibility
Interface AccessibleExtendedText


public interface AccessibleExtendedText

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 sample code for javax.accessibility.Accessible definition code for javax.accessibility.Accessible ) and then calling the AccessibleContext.getAccessibleText() sample code for javax.accessibility.AccessibleContext.getAccessibleText() definition code for javax.accessibility.AccessibleContext.getAccessibleText() method of AccessibleContext. If the return value is an instance of AccessibleExtendedText, the object supports this interface.

See Also:
Accessible sample code for javax.accessibility.Accessible definition code for javax.accessibility.Accessible , Accessible.getAccessibleContext() sample code for javax.accessibility.Accessible.getAccessibleContext() definition code for javax.accessibility.Accessible.getAccessibleContext() , AccessibleContext sample code for javax.accessibility.AccessibleContext definition code for javax.accessibility.AccessibleContext , AccessibleContext.getAccessibleText() sample code for javax.accessibility.AccessibleContext.getAccessibleText() definition code for javax.accessibility.AccessibleContext.getAccessibleText() , AccessibleText.AccessibleTextChunk

Field Summary
static int ATTRIBUTE_RUN sample code for javax.accessibility.AccessibleExtendedText.ATTRIBUTE_RUN definition code for javax.accessibility.AccessibleExtendedText.ATTRIBUTE_RUN
          Constant used to indicate that the part of the text that should be retrieved is contiguous text with the same text attributes.
static int LINE sample code for javax.accessibility.AccessibleExtendedText.LINE definition code for javax.accessibility.AccessibleExtendedText.LINE
          Constant used to indicate that the part of the text that should be retrieved is a line of text.
 
Method Summary
 Rectangle sample code for java.awt.Rectangle definition code for java.awt.Rectangle getTextBounds sample code for javax.accessibility.AccessibleExtendedText.getTextBounds(int, int) definition code for javax.accessibility.AccessibleExtendedText.getTextBounds(int, int) (int startIndex, int endIndex)
          Returns the bounding rectangle of the text between two indices.
 String sample code for java.lang.String definition code for java.lang.String getTextRange sample code for javax.accessibility.AccessibleExtendedText.getTextRange(int, int) definition code for javax.accessibility.AccessibleExtendedText.getTextRange(int, int) (int startIndex, int endIndex)
          Returns the text between two indices
 AccessibleTextSequence sample code for javax.accessibility.AccessibleTextSequence definition code for javax.accessibility.AccessibleTextSequence getTextSequenceAfter sample code for javax.accessibility.AccessibleExtendedText.getTextSequenceAfter(int, int) definition code for javax.accessibility.AccessibleExtendedText.getTextSequenceAfter(int, int) (int part, int index)
          Returns the AccessibleTextSequence after a given index.
 AccessibleTextSequence sample code for javax.accessibility.AccessibleTextSequence definition code for javax.accessibility.AccessibleTextSequence getTextSequenceAt sample code for javax.accessibility.AccessibleExtendedText.getTextSequenceAt(int, int) definition code for javax.accessibility.AccessibleExtendedText.getTextSequenceAt(int, int) (int part, int index)
          Returns the AccessibleTextSequence at a given index.
 AccessibleTextSequence sample code for javax.accessibility.AccessibleTextSequence definition code for javax.accessibility.AccessibleTextSequence getTextSequenceBefore sample code for javax.accessibility.AccessibleExtendedText.getTextSequenceBefore(int, int) definition code for javax.accessibility.AccessibleExtendedText.getTextSequenceBefore(int, int) (int part, int index)
          Returns the AccessibleTextSequence before a given index.
 

Field Detail

LINE sample code for javax.accessibility.AccessibleExtendedText.LINE

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

See Also:
#getAtIndex, #getAfterIndex, #getBeforeIndex, Constant Field Values

ATTRIBUTE_RUN sample code for javax.accessibility.AccessibleExtendedText.ATTRIBUTE_RUN

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.

See Also:
#getAtIndex, #getAfterIndex, #getBeforeIndex, Constant Field Values
Method Detail

getTextRange sample code for javax.accessibility.AccessibleExtendedText.getTextRange(int, int) definition code for javax.accessibility.AccessibleExtendedText.getTextRange(int, int)

String sample code for java.lang.String definition code for java.lang.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.

getTextSequenceAt sample code for javax.accessibility.AccessibleExtendedText.getTextSequenceAt(int, int) definition code for javax.accessibility.AccessibleExtendedText.getTextSequenceAt(int, int)

AccessibleTextSequence sample code for javax.accessibility.AccessibleTextSequence definition code for javax.accessibility.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.
See Also:
AccessibleText.CHARACTER, AccessibleText.WORK, AccessibleText.SENTENCE

getTextSequenceAfter sample code for javax.accessibility.AccessibleExtendedText.getTextSequenceAfter(int, int) definition code for javax.accessibility.AccessibleExtendedText.getTextSequenceAfter(int, int)

AccessibleTextSequence sample code for javax.accessibility.AccessibleTextSequence definition code for javax.accessibility.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.
See Also:
AccessibleText.CHARACTER, AccessibleText.WORK, AccessibleText.SENTENCE

getTextSequenceBefore sample code for javax.accessibility.AccessibleExtendedText.getTextSequenceBefore(int, int) definition code for javax.accessibility.AccessibleExtendedText.getTextSequenceBefore(int, int)

AccessibleTextSequence sample code for javax.accessibility.AccessibleTextSequence definition code for javax.accessibility.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.
See Also:
AccessibleText.CHARACTER, AccessibleText.WORK, AccessibleText.SENTENCE

getTextBounds sample code for javax.accessibility.AccessibleExtendedText.getTextBounds(int, int) definition code for javax.accessibility.AccessibleExtendedText.getTextBounds(int, int)

Rectangle sample code for java.awt.Rectangle definition code for java.awt.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.