|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectice.pilots.html4.Html4DocumentAccess
An initial implementation of the DocumentAccess
| Field Summary | |
static int |
ALL
|
static int |
CHARACTER_TYPE
|
static int |
MAX_TYPE
|
static int |
SENTENCE_TYPE
|
static int |
WORD_TYPE
|
| Constructor Summary | |
Html4DocumentAccess()
|
|
Html4DocumentAccess(ThePilot aPilot)
Construct the Accessibility Implementation with a concrete tool that can provide the underlying layout support. |
|
| Method Summary | |
int |
getCaretPosition(int aType)
Retrieve the current Caret position for an element type. |
CharacterAttributes |
getCharAttributes(int aIndex)
Retrieve the CSS attributes for a character identified by its index. |
int |
getCount(int aType)
Retrieve the number of chars, words, sentences, or paragraphs in the document |
String |
getCurrentText(int aType)
Retrieve the text at the current cursor location. |
int |
getIndexAtPoint(int aX,
int aY,
int scrollX,
int scrollY)
Retrieve the character Index of a point X,Y on the screen, with a scroll bar position. |
int |
getIndexOfNode(DNode node)
Given a node, returns the character index offset for that node. |
String |
getNext(int aType)
Get the next entity of a given type. |
DNode |
getNodeByIndex(int aType,
int aIndex)
Return the DOM Node associated with a particular element. |
String |
getPrevious(int aType)
Retrieve the previous entity of a given type. |
String |
getSelectedText()
Retrieve the text that is currently selected. |
int |
getSelectionEnd()
Retrieve the index of the character that is the last in any selected passage of text. |
int |
getSelectionStart()
Get the index of the character that is the first in any selected passage of text. |
String |
getText(int aType,
int aIndex)
Get the text indicated by the 'type' and the position in the document given by 'index'. |
String |
getTextAt(int aType,
int aX,
int aY,
int aScrollX,
int aScrollY)
Position the cursor to whatever text is at the pixel location in the rendered document, and return the type of text element that is found there. |
void |
positionToIndex(int aType,
int aIndex)
Position the caret to an element in the document. |
void |
selectWordByIndex(int wordIndex)
Select the word given by the wordIndex. |
void |
setSelection(int type,
int x,
int y)
Selects specified entity under the specified point on the screen. |
void |
setSelection(int x1,
int y1,
int x2,
int y2)
Allows you to set a text selection on a page by specifying a bounding box (like a drag rectangle). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int CHARACTER_TYPE
public static final int WORD_TYPE
public static final int SENTENCE_TYPE
public static final int MAX_TYPE
public static final int ALL
| Constructor Detail |
public Html4DocumentAccess(ThePilot aPilot)
aPilot - instance of the HTML4 pilot to obtain the required references frompublic Html4DocumentAccess()
| Method Detail |
public String getCurrentText(int aType)
aType - The enumerated type of text to retrieve.
public String getTextAt(int aType,
int aX,
int aY,
int aScrollX,
int aScrollY)
aType - The enumerated text typeaX - The X position of the pixel.aY - The Y position of the pixelaScrollX - The current X position of the scroll bar.aScrollY - The current Y position of the scroll bar.
public String getText(int aType,
int aIndex)
aType - The Enumerated text typeaIndex - The zero based text index of the given type
public void positionToIndex(int aType,
int aIndex)
0 <= index < getCount( aType )
aType - The element enumerationaIndex - The index of the elementpublic int getCaretPosition(int aType)
0 <= index < getCount( aType )
aType - The element enumeration
public CharacterAttributes getCharAttributes(int aIndex)
aIndex - The index of the character in the range 0 < index < getCount(DocumentAccess.CHARACTER_TYPE)
public int getIndexOfNode(DNode node)
node - the node of interest
public int getIndexAtPoint(int aX,
int aY,
int scrollX,
int scrollY)
0 <= index < getCount( aType ) if there is a character at the point
or -1 if there is no character at that screen position
public DNode getNodeByIndex(int aType,
int aIndex)
aType - the element enumerationaIndex - The index of the element
public String getNext(int aType)
aType - The enumerated type of text to retrieve
public String getPrevious(int aType)
aType - The enumerated type of text to retrieve
public int getSelectionStart()
public int getSelectionEnd()
public String getSelectedText()
public int getCount(int aType)
aType - The enumerated type to count
public void setSelection(int x1,
int y1,
int x2,
int y2)
x1 - starting x coordinatey1 - starting y coordinatex2 - ending x coordinatey2 - ending y coordinate
public void setSelection(int type,
int x,
int y)
x - the x coordinatey - the y coordinatepublic void selectWordByIndex(int wordIndex)
wordIndex - The index of the word that is selected
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||