org.eclipse.actf.accservice.core
Interface IAccessibleTextElement

All Known Implementing Classes:
IA2AccessibleText, JavaAccessibleText

public interface IAccessibleTextElement

Interface for exposing accessibility-related properties of text components to the validation engine.

Author:
Mike Smith
See Also:
IAccessibleElement2

Method Summary
 Object getAttributes(long offset)
          get the attributes at the specified offset of the text
 long getCaretOffset()
          get the offset of the caret for the accessible text object
 String getSelectedText(long index)
          get the text of the selected object
 long getSelectedTextEnd(long index)
          get the ending index of the selected text
 long getSelectedTextStart(long index)
          get the starting index of the selected text
 long getSelectionCount()
          get number of active non-contiguous selections
 String getText()
          get the text for the accessible text object
 

Method Detail

getText

String getText()
               throws InvalidComponentException
get the text for the accessible text object

Returns:
text or an empty string if no text is provided
Throws:
InvalidComponentException

getCaretOffset

long getCaretOffset()
                    throws InvalidComponentException
get the offset of the caret for the accessible text object

Returns:
caret offset
Throws:
InvalidComponentException

getAttributes

Object getAttributes(long offset)
                     throws InvalidComponentException
get the attributes at the specified offset of the text

Parameters:
offset - zero index of caret offset
Returns:
attributes or an empty string if no description is provided
Throws:
InvalidComponentException

getSelectionCount

long getSelectionCount()
                       throws InvalidComponentException
get number of active non-contiguous selections

Returns:
the number of selections
Throws:
InvalidComponentException

getSelectedText

String getSelectedText(long index)
                       throws InvalidComponentException
get the text of the selected object

Parameters:
index - zero index of selected text objects
Returns:
the number of selections or empty string if index is out of range
Throws:
InvalidComponentException

getSelectedTextStart

long getSelectedTextStart(long index)
                          throws InvalidComponentException
get the starting index of the selected text

Parameters:
index - zero index of selected text objects
Returns:
the starting index of the selection
Throws:
InvalidComponentException

getSelectedTextEnd

long getSelectedTextEnd(long index)
                        throws InvalidComponentException
get the ending index of the selected text

Parameters:
index - zero index of selected text objects
Returns:
the ending index of the selection
Throws:
InvalidComponentException