After creating an instance of a class that implements
this interface it can be added to an accessible using the
addAccessibleTextListener method and removed using
the removeAccessibleTextListener method.

getText

Returns a substring and its range for the given range, count and boundary type.

Returns the substring of the specified boundary type that is located count
positions from the given character range. Also returns the start and end
offsets of the returned substring.

For example, if the boundary type is TEXT_BOUNDARY_WORD, then the complete
word that is located count words from the specified range is returned.
If count is negative, then return the word that is count words before start.
If count is positive, then return the word that is count words after end.
If count is zero, start and end are the same, so return the word at start.

The whole text can be requested by passing start == 0 and end == getCharacterCount,
TEXT_BOUNDARY_ALL, and 0 for count. Alternatively the whole text can be requested
by calling AccessibleControlListener.getValue().

If start and end are valid, but no suitable word (or other boundary type) is found,
the returned string is null and the returned range is degenerate (start == end).

getTextBounds

Returns the bounding box(es) of the specified text range in display coordinates.

Typically, the text range will represent a single character, i.e. end - start = 1,
therefore providers should optimize for this case.

Note: The virtual character after the last character of the represented text,
i.e. the one at offset getCharacterCount, is a special case. It represents the
current input position and will therefore typically be queried by AT more
often than other positions. Because it does not represent an existing character
its bounding box is defined in relation to preceding characters. It should be
roughly equivalent to the bounding box of some character when inserted at the
end of the text; its height typically being the maximal height of all the
characters in the text or the height of the preceding character, its width
being at least one pixel so that the bounding box is not degenerate.

Parameters:

e - an event object containing the following fields:

[in] start - the 0 based offset of the first character of the substring in the bounding box

[in] end - the 0 based offset after the last character of the substring in the bounding box

[typical out] x - the X coordinate of the top left corner of the bounding box of the specified substring

[typical out] y - the Y coordinate of the top left corner of the bounding box of the specified substring

[typical out] width - the width of the bounding box of the specified substring

[typical out] height - the height of the bounding box of the specified substring

[optional out] rectangles - a set of disjoint bounding rectangles, if the specified text range includes
partial lines

setCaretOffset

The caret position is that of the character logically following it,
e.g. to the right of it in a left to right language.
The caret is actually placed to the leading side of the character with
that offset. An offset of 0 places the caret so that the next insertion
goes before the first character. An offset of getCharacterCount places
the caret so that the next insertion goes after the last character.

Setting the caret position may or may not alter the current selection. A
change of the selection is notified to the accessibility event listeners with
an EVENT_TEXT_SELECTION_CHANGED event.

When the new caret position differs from the old one, this is notified to the
accessibility event listeners with an EVENT_TEXT_CARET_MOVED event.