|
Eclipse Rich Ajax Platform | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.swt.accessibility.AccessibleTextAdapter org.eclipse.swt.accessibility.AccessibleTextExtendedAdapter
public class AccessibleTextExtendedAdapter
This adapter class provides default implementations for the
methods in the AccessibleTextExtendedListener
interface.
Classes that wish to deal with AccessibleTextExtended
events can
extend this class and override only the methods that they are
interested in.
AccessibleTextExtendedListener
,
AccessibleTextEvent
Constructor Summary | |
---|---|
AccessibleTextExtendedAdapter()
|
Method Summary | |
---|---|
void |
addSelection(AccessibleTextEvent e)
Adds a text selection. |
void |
getCharacterCount(AccessibleTextEvent e)
Returns the total number of characters in the text. |
void |
getHyperlink(AccessibleTextEvent e)
Returns the specified hyperlink. |
void |
getHyperlinkCount(AccessibleTextEvent e)
Returns the number of links and link groups contained within this hypertext paragraph. |
void |
getHyperlinkIndex(AccessibleTextEvent e)
Returns the index of the hyperlink that is associated with this character offset. |
void |
getOffsetAtPoint(AccessibleTextEvent e)
Returns the offset of the character under the specified point. |
void |
getRanges(AccessibleTextEvent e)
Returns the text range(s) contained within the given bounding box. |
void |
getSelection(AccessibleTextEvent e)
Returns the character offsets of the specified text selection. |
void |
getSelectionCount(AccessibleTextEvent e)
Returns the number of active non-contiguous selections. |
void |
getText(AccessibleTextEvent e)
Returns a substring and its range for the given range, count and boundary type. |
void |
getTextBounds(AccessibleTextEvent e)
Returns the bounding box(es) of the specified text range in display coordinates. |
void |
getVisibleRanges(AccessibleTextEvent e)
Returns the visible text range(s). |
void |
removeSelection(AccessibleTextEvent e)
Deselects a range of text. |
void |
scrollText(AccessibleTextEvent e)
Scrolls a specific part of a substring according to the scroll type. |
void |
setCaretOffset(AccessibleTextEvent e)
Sets the position of the caret. |
void |
setSelection(AccessibleTextEvent e)
Changes the bounds of an existing selection. |
Methods inherited from class org.eclipse.swt.accessibility.AccessibleTextAdapter |
---|
getCaretOffset, getSelectionRange |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.swt.accessibility.AccessibleTextListener |
---|
getCaretOffset, getSelectionRange |
Constructor Detail |
---|
public AccessibleTextExtendedAdapter()
Method Detail |
---|
public void addSelection(AccessibleTextEvent e)
addSelection
in interface AccessibleTextExtendedListener
e
- an event object containing the following fields:ACC.OK
if the text selection was addedpublic void getCharacterCount(AccessibleTextEvent e)
getCharacterCount
in interface AccessibleTextExtendedListener
e
- an event object containing the following fields:public void getHyperlinkCount(AccessibleTextEvent e)
getHyperlinkCount
in interface AccessibleTextExtendedListener
e
- an event object containing the following fields:public void getHyperlink(AccessibleTextEvent e)
getHyperlink
in interface AccessibleTextExtendedListener
e
- an event object containing the following fields:public void getHyperlinkIndex(AccessibleTextEvent e)
This is the case when a link spans the given character index.
getHyperlinkIndex
in interface AccessibleTextExtendedListener
e
- an event object containing the following fields:public void getOffsetAtPoint(AccessibleTextEvent e)
getOffsetAtPoint
in interface AccessibleTextExtendedListener
e
- an event object containing the following fields:public void getRanges(AccessibleTextEvent e)
Partially visible characters are included in the returned ranges.
getRanges
in interface AccessibleTextExtendedListener
e
- an event object containing the following fields:public void getSelection(AccessibleTextEvent e)
getSelection
in interface AccessibleTextExtendedListener
e
- an event object containing the following fields:public void getSelectionCount(AccessibleTextEvent e)
getSelectionCount
in interface AccessibleTextExtendedListener
e
- an event object containing the following fields:public void getText(AccessibleTextEvent e)
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).
getText
in interface AccessibleTextExtendedListener
e
- an event object containing the following fields:public void getTextBounds(AccessibleTextEvent e)
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.
getTextBounds
in interface AccessibleTextExtendedListener
e
- an event object containing the following fields:public void getVisibleRanges(AccessibleTextEvent e)
Partially visible characters are included in the returned ranges.
getVisibleRanges
in interface AccessibleTextExtendedListener
e
- an event object containing the following fields:public void removeSelection(AccessibleTextEvent e)
removeSelection
in interface AccessibleTextExtendedListener
e
- an event object containing the following fields:ACC.OK
if the range of text was deselectedpublic void scrollText(AccessibleTextEvent e)
scrollText
in interface AccessibleTextExtendedListener
e
- an event object containing the following fields:ACC.OK
if the text was scrolledpublic void setCaretOffset(AccessibleTextEvent e)
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.
setCaretOffset
in interface AccessibleTextExtendedListener
e
- an event object containing the following fields:ACC.OK
if the caret position was setpublic void setSelection(AccessibleTextEvent e)
setSelection
in interface AccessibleTextExtendedListener
e
- an event object containing the following fields:ACC.OK
if the selection was set
|
Eclipse Rich Ajax Platform | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) EclipseSource and others 2002, 2012. All rights reserved.