|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.xpn.xwiki.wysiwyg.client.selection.internal.AbstractRange
com.xpn.xwiki.wysiwyg.client.selection.internal.DefaultRange
public class DefaultRange
| Method Summary | |
|---|---|
DocumentFragment |
cloneContents()
Duplicates the contents of a Range. |
protected com.google.gwt.core.client.JavaScriptObject |
cloneJSRange()
|
Range |
cloneRange()
Produces a new Range whose boundary-points are equal to the boundary-points of the Range. |
void |
collapse(boolean toStart)
Collapse a Range onto one of its boundary-points. |
protected short |
compareBoundaryPoints(int how,
com.google.gwt.core.client.JavaScriptObject sourceRange)
|
void |
deleteContents()
Removes the contents of a Range from the containing document or document fragment without returning a reference to the removed content. |
void |
detach()
Called to indicate that the Range is no longer in use and that the implementation may relinquish any resources associated with this Range. |
DocumentFragment |
extractContents()
Moves the contents of a Range from the containing document or document fragment to a new DocumentFragment. |
com.google.gwt.dom.client.Node |
getCommonAncestorContainer()
|
com.google.gwt.dom.client.Node |
getEndContainer()
|
int |
getEndOffset()
|
com.google.gwt.dom.client.Node |
getStartContainer()
|
int |
getStartOffset()
|
void |
insertNode(com.google.gwt.dom.client.Node newNode)
Inserts a node into the Document or DocumentFragment at the start of the Range. |
boolean |
isCollapsed()
|
void |
selectNode(com.google.gwt.dom.client.Node refNode)
Select a node and its contents. |
void |
selectNodeContents(com.google.gwt.dom.client.Node refNode)
Select the contents within a node. |
void |
setEnd(com.google.gwt.dom.client.Node refNode,
int offset)
Sets the attributes describing the end of a Range. |
void |
setEndAfter(com.google.gwt.dom.client.Node refNode)
Sets the end of a Range to be after a node. |
void |
setEndBefore(com.google.gwt.dom.client.Node refNode)
Sets the end position to be before a node. |
void |
setStart(com.google.gwt.dom.client.Node refNode,
int offset)
Sets the attributes describing the start of the Range. |
void |
setStartAfter(com.google.gwt.dom.client.Node refNode)
Sets the start position to be after a node. |
void |
setStartBefore(com.google.gwt.dom.client.Node refNode)
Sets the start position to be before a node. |
void |
surroundContents(com.google.gwt.dom.client.Node newParent)
Re-parents the contents of the Range to the given node and inserts the node at the position of the start of the Range. |
java.lang.String |
toString()
Returns the contents of a Range as a string. |
| Methods inherited from class com.xpn.xwiki.wysiwyg.client.selection.internal.AbstractRange |
|---|
compareBoundaryPoints, getJSRange |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public boolean isCollapsed()
Range.isCollapsed()public com.google.gwt.dom.client.Node getCommonAncestorContainer()
Range.getCommonAncestorContainer()public com.google.gwt.dom.client.Node getEndContainer()
Range.getEndContainer()public int getEndOffset()
Range.getEndOffset()public com.google.gwt.dom.client.Node getStartContainer()
Range.getStartContainer()public int getStartOffset()
Range.getStartOffset()
public void setStart(com.google.gwt.dom.client.Node refNode,
int offset)
refNode - The refNode value. This parameter must be different from null.offset - The startOffset value.Range.setStart(Node, int)
public void setEnd(com.google.gwt.dom.client.Node refNode,
int offset)
refNode - The refNode value. This parameter must be different from null.offset - The endOffset value.Range.setEnd(Node, int)public void setStartBefore(com.google.gwt.dom.client.Node refNode)
refNode - Range starts before refNode.Range.setStartBefore(Node)public void setStartAfter(com.google.gwt.dom.client.Node refNode)
refNode - Range starts after refNode.Range.setStartAfter(Node)public void setEndBefore(com.google.gwt.dom.client.Node refNode)
refNode - Range ends before refNode.Range.setEndBefore(Node)public void setEndAfter(com.google.gwt.dom.client.Node refNode)
refNode - Range ends after refNode.Range.setEndAfter(Node)public void selectNode(com.google.gwt.dom.client.Node refNode)
refNode - The node to select.Range.selectNode(Node)public void selectNodeContents(com.google.gwt.dom.client.Node refNode)
refNode - Node to select from.Range.selectNodeContents(Node)public void collapse(boolean toStart)
toStart - If true, collapses the Range onto its start; if false, collapses it onto its end.Range.collapse(boolean)public DocumentFragment cloneContents()
Range.cloneContents()public void deleteContents()
Range.deleteContents()public DocumentFragment extractContents()
Range.extractContents()public void insertNode(com.google.gwt.dom.client.Node newNode)
newNode - The node to insert at the start of the Range.Range.insertNode(Node)public void surroundContents(com.google.gwt.dom.client.Node newParent)
newParent - The node to surround the contents with.Range.surroundContents(Node)
protected short compareBoundaryPoints(int how,
com.google.gwt.core.client.JavaScriptObject sourceRange)
compareBoundaryPoints in class AbstractRangeAbstractRange.compareBoundaryPoints(int, JavaScriptObject)public Range cloneRange()
Range.cloneRange()protected com.google.gwt.core.client.JavaScriptObject cloneJSRange()
public void detach()
Range.detach()public java.lang.String toString()
toString in interface RangetoString in class java.lang.ObjectRange.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||