|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.mozilla.jrex.selection.JRexSelectionImpl
JRexSelectionImpl implements JRexSelection interface.
| Constructor Summary | |
JRexSelectionImpl()
|
|
| 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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public JRexSelectionImpl()
| Method Detail |
public void setJRexPeer(int jrexPeer)
JRexSelection
setJRexPeer in interface JRexSelectionjrexPeer - jrex peer window associated with browser component
public Node getAnchorNode()
throws JRexException
JRexSelection
getAnchorNode in interface JRexSelectionJRexException
public int getAnchorOffset()
throws JRexException
JRexSelection
getAnchorOffset in interface JRexSelectionJRexException
public Node getFocusNode()
throws JRexException
JRexSelection
getFocusNode in interface JRexSelectionJRexException
public int getFocusOffset()
throws JRexException
JRexSelection
getFocusOffset in interface JRexSelectionJRexException
public boolean getIsCollapsed()
throws JRexException
JRexSelection
getIsCollapsed in interface JRexSelectionJRexException
public int getRangeCount()
throws JRexException
JRexSelection
getRangeCount in interface JRexSelectionJRexException
public Range getRangeAt(int index)
throws JRexException
JRexSelectionindex.
getRangeAt in interface JRexSelectionindex - the index of range to retrived.
JRexException
public void collapse(Node parentNode,
int offset)
throws JRexException
JRexSelection
collapse in interface JRexSelectionparentNode - 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
JRexSelection
extend in interface JRexSelectionparentNode - 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
JRexSelection
collapseToStart in interface JRexSelectionJRexException
public void collapseToEnd()
throws JRexException
JRexSelection
collapseToEnd in interface JRexSelectionJRexException
public boolean containsNode(Node node,
boolean entirelyContained)
throws JRexException
JRexSelection
containsNode in interface JRexSelectionnode - The node where the selection will be extended toentirelyContained - Whether
JRexException
public void selectAllChildren(Node parentNode)
throws JRexException
JRexSelection
selectAllChildren in interface JRexSelectionparentNode - the parent of the children to be added to the selection.
JRexException
public void addRange(Range range)
throws JRexException
JRexSelection
addRange in interface JRexSelectionrange - the range to be added.
JRexException
public void removeRange(Range range)
throws JRexException
JRexSelection
removeRange in interface JRexSelectionrange - the range to be removed.
JRexException
public void removeAllRanges()
throws JRexException
JRexSelection
removeAllRanges in interface JRexSelectionJRexException
public void deleteFromDocument()
throws JRexException
JRexSelection
deleteFromDocument in interface JRexSelectionJRexException
public void selectionLanguageChange(boolean langRTL)
throws JRexException
JRexSelection
selectionLanguageChange in interface JRexSelectionlangRTL - is true if the new language is right-to-left or
false if the new language is left-to-right.
JRexExceptionpublic String toString()
JRexSelection
toString in interface JRexSelection
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||