This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.accessibility
interface AccessibleExtendedText

All Known Implementing Classes:
JTextComponent.AccessibleJTextComponent, JEditorPane.AccessibleJEditorPane, JTextArea.AccessibleJTextArea, JTextField.AccessibleJTextField, JEditorPane.AccessibleJEditorPaneHTML, JEditorPane.JEditorPaneAccessibleHypertextSupport, JPasswordField.AccessibleJPasswordField

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 {@link Accessible}) and then calling the {@link AccessibleContext#getAccessibleText} method of AccessibleContext. If the return value is an instance of AccessibleExtendedText, the object supports this interface.


Field Summary
static 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.
static int LINE
          Constant used to indicate that the part of the text that should be retrieved is a line of text.
 
Method Summary
 Rectangle
getTextBounds(int startIndex, int endIndex)

          Returns the bounding rectangle of the text between two indices.
 String
getTextRange(int startIndex, int endIndex)

          Returns the text between two indices
 AccessibleTextSequence
getTextSequenceAfter(int part, int index)

          Returns the AccessibleTextSequence after a given index.
 AccessibleTextSequence
getTextSequenceAt(int part, int index)

          Returns the AccessibleTextSequence at a given index.
 AccessibleTextSequence
getTextSequenceBefore(int part, int index)

          Returns the AccessibleTextSequence before a given index.
 

Field Detail

ATTRIBUTE_RUN

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.

LINE

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

getTextBounds

public 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.

getTextRange

public 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.

getTextSequenceAfter

public 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.

getTextSequenceAt

public 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.

getTextSequenceBefore

public 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.


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.