|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Selection
A selection object represents the ranges that the user has selected, or the cursor position when the user didn't select any range. It is the only was to get access to the current DOM nodes being edited with the WYSIWYG editor.
| Method Summary | |
|---|---|
void |
addRange(Range range)
Adds a range to the current selection. |
void |
collapse(com.google.gwt.dom.client.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(com.google.gwt.dom.client.Node node,
boolean partlyContained)
Indicates whether the node is part of the selection. |
void |
deleteFromDocument()
Deletes this selection from document the nodes belong to. |
void |
extend(com.google.gwt.dom.client.Node parentNode,
int offset)
Extends the selection by moving the selection end to the specified node and offset, preserving the selection begin position. |
com.google.gwt.dom.client.Node |
getAnchorNode()
|
int |
getAnchorOffset()
|
com.google.gwt.dom.client.Node |
getFocusNode()
|
int |
getFocusOffset()
|
Range |
getRangeAt(int index)
|
int |
getRangeCount()
|
boolean |
isCollapsed()
|
void |
removeAllRanges()
Removes all ranges from the current selection. |
void |
removeRange(Range range)
Removes a range from the current selection. |
void |
selectAllChildren(com.google.gwt.dom.client.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 |
java.lang.String |
toString()
|
| Method Detail |
|---|
com.google.gwt.dom.client.Node getAnchorNode()
int getAnchorOffset()
com.google.gwt.dom.client.Node getFocusNode()
int getFocusOffset()
boolean isCollapsed()
int getRangeCount()
Range getRangeAt(int index)
void collapse(com.google.gwt.dom.client.Node parentNode,
int offset)
parentNode - The given dom node where the selection will be set.offset - Where in given dom node to place the selection (the offset into the given node).
void extend(com.google.gwt.dom.client.Node parentNode,
int offset)
parentNode - The node where the selection will be extended to.offset - Where in node to place the offset in the new selection end.void collapseToStart()
void collapseToEnd()
boolean containsNode(com.google.gwt.dom.client.Node node,
boolean partlyContained)
void selectAllChildren(com.google.gwt.dom.client.Node parentNode)
parentNode - the parent of the children to be added to the selection.void addRange(Range range)
void removeRange(Range range)
void removeAllRanges()
void deleteFromDocument()
void selectionLanguageChange(boolean langRTL)
langRTL - is true if the new language is right-to-left or false if the new language is left-to-right.java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||