|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JRexSelection interface defines selection related operations.
Method Summary | |
void |
addRange(Range range)
Adds a range to the current selection. |
void |
collapse(Node parentNode,
int offset)
Collapses the selection to a single point, at the specified offset in the given DOM node. |
void |
collapseToEnd()
Collapses the whole selection to a single point at the end of the current selection (irrespective of direction). |
void |
collapseToStart()
Collapses the whole selection to a single point at the start of the current selection (irrespective of direction). |
boolean |
containsNode(Node node,
boolean entirelyContained)
The value of entirelyContained determines the detail of the search to determine if the selection contains the node. |
void |
deleteFromDocument()
Deletes this selection from document the nodes belong to. |
void |
extend(Node parentNode,
int offset)
Extends the selection by moving the focus to the specified node and offset, preserving the anchor postion. |
Node |
getAnchorNode()
Returns the node representing one end of the selection. |
int |
getAnchorOffset()
Returns the offset within the (text) node where the selection begins. |
Node |
getFocusNode()
Returns the node with keyboard focus. |
int |
getFocusOffset()
Returns the offset within the (text) node where focus starts. |
boolean |
getIsCollapsed()
Indicates if the selection is collapsed or not. |
Range |
getRangeAt(int index)
Returns the range at given index . |
int |
getRangeCount()
Returns the number of ranges in the selection. |
void |
removeAllRanges()
Removes all ranges from the current selection. |
void |
removeRange(Range range)
Removes a range from the current selection. |
void |
selectAllChildren(Node parentNode)
Adds all children of the specified node to the selection. |
void |
selectionLanguageChange(boolean langRTL)
Modifies the cursor Bidi level after a change in keyboard direction |
void |
setJRexPeer(int jrexPeer)
The peer JREX Window on which to select |
String |
toString()
Returns the whole selection into a plain text string. |
Method Detail |
public void setJRexPeer(int jrexPeer)
jrexPeer
- jrex peer window associated with browser componentpublic Node getAnchorNode() throws JRexException
JRexException
public int getAnchorOffset() throws JRexException
JRexException
public Node getFocusNode() throws JRexException
JRexException
public int getFocusOffset() throws JRexException
JRexException
public boolean getIsCollapsed() throws JRexException
JRexException
public int getRangeCount() throws JRexException
JRexException
public Range getRangeAt(int index) throws JRexException
index
.
index
- the index of range to retrived.
JRexException
public void collapse(Node parentNode, int offset) throws JRexException
parentNode
- The given dom node where the selection will be setoffset
- Where in given dom node to place the selection (the offset into the given node)
JRexException
public void extend(Node parentNode, int offset) throws JRexException
parentNode
- The node where the selection will be extended tooffset
- Where in node to place the offset in the new focused node
JRexException
public void collapseToStart() throws JRexException
JRexException
public void collapseToEnd() throws JRexException
JRexException
public boolean containsNode(Node node, boolean entirelyContained) throws JRexException
node
- The node where the selection will be extended toentirelyContained
- Whether
JRexException
public void selectAllChildren(Node parentNode) throws JRexException
parentNode
- the parent of the children to be added to the selection.
JRexException
public void addRange(Range range) throws JRexException
range
- the range to be added.
JRexException
public void removeRange(Range range) throws JRexException
range
- the range to be removed.
JRexException
public void removeAllRanges() throws JRexException
JRexException
public void deleteFromDocument() throws JRexException
JRexException
public void selectionLanguageChange(boolean langRTL) throws JRexException
langRTL
- is true
if the new language is right-to-left or
false
if the new language is left-to-right.
JRexException
public String toString()
toString
in class Object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |