|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.gwt.core.client.JavaScriptObject
org.xwiki.gwt.dom.client.JavaScriptObject
org.xwiki.gwt.dom.client.internal.mozilla.NativeSelection
public final class NativeSelection
The native selection implementation provided by Mozilla.
| Constructor Summary | |
|---|---|
protected |
NativeSelection()
Default constructor. |
| Method Summary | |
|---|---|
void |
addRange(NativeRange range)
Adds a range to this 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 given 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()
|
static NativeSelection |
getInstance(Document document)
Retrieves the native selection object using Mozilla's API. |
NativeRange |
getRangeAt(int index)
|
int |
getRangeCount()
|
boolean |
isCollapsed()
|
void |
removeAllRanges()
Removes all ranges from the current selection. |
void |
removeRange(NativeRange range)
Removes the given range from the 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. |
| Methods inherited from class org.xwiki.gwt.dom.client.JavaScriptObject |
|---|
fromJson, get, getKeys, remove, set |
| Methods inherited from class com.google.gwt.core.client.JavaScriptObject |
|---|
cast, createArray, createFunction, createObject, equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected NativeSelection()
| Method Detail |
|---|
public static NativeSelection getInstance(Document document)
document - the document for which to retrieve the selection instance
public void addRange(NativeRange range)
range - the range to be added
public void collapse(com.google.gwt.dom.client.Node parentNode,
int offset)
parentNode - the DOM node where the selection will be setoffset - specifies where to place the selection in the given nodepublic void collapseToEnd()
public void collapseToStart()
public boolean containsNode(com.google.gwt.dom.client.Node node,
boolean partlyContained)
node - the DOM node to be testedpartlyContained - if false, the entire subtree rooted in the given node is tested
public void deleteFromDocument()
public void extend(com.google.gwt.dom.client.Node parentNode,
int offset)
parentNode - the node where the selection will be extended tooffset - specifies where to end the selection in the given nodepublic com.google.gwt.dom.client.Node getAnchorNode()
public int getAnchorOffset()
getAnchorNode() where the selection beginspublic com.google.gwt.dom.client.Node getFocusNode()
public int getFocusOffset()
getFocusNode() where the selection ends.public NativeRange getRangeAt(int index)
index - the index of the range to retrieve. Usually the selection contains just one range.
public int getRangeCount()
public boolean isCollapsed()
public void removeAllRanges()
public void removeRange(NativeRange range)
range - the range to be removed from the selection.public void selectAllChildren(com.google.gwt.dom.client.Node parentNode)
parentNode - the parent of the children to be added to the selectionpublic 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||