API Overview API Index Package Overview Direct link to this page
JDK 1.6
  org.w3c.dom.ranges. Range View Source
Author(s)
Since
DOM Level 2
Version
Serial
Hierarchy
 Range
Subinterfaces
Description
public interface Range
See also:   
Methods
Hide/Show inherited methods
public DocumentFragment cloneContents () throws DOMException
  Duplicates the contents of a Range
public Range cloneRange () throws DOMException
  Produces a new Range whose boundary-points are equal to the boundary-points of the Range.
public void collapse (boolean toStart) throws DOMException
  Collapse a Range onto one of its boundary-points
public short compareBoundaryPoints (short how, Range sourceRange) throws DOMException
  Compare the boundary-points of two Ranges in a document.
public void deleteContents () throws DOMException
  Removes the contents of a Range from the containing document or document fragment without returning a reference to the removed content.
public void detach () throws DOMException
  Called to indicate that the Range is no longer in use and that the implementation may relinquish any resources associated with this Range.
public DocumentFragment extractContents () throws DOMException
  Moves the contents of a Range from the containing document or document fragment to a new DocumentFragment.
public boolean getCollapsed () throws DOMException
  TRUE if the Range is collapsed
public Node getCommonAncestorContainer () throws DOMException
  The deepest common ancestor container of the Range's two boundary-points.
public Node getEndContainer () throws DOMException
  Node within which the Range ends
public int getEndOffset () throws DOMException
  Offset within the ending node of the Range.
public Node getStartContainer () throws DOMException
  Node within which the Range begins
public int getStartOffset () throws DOMException
  Offset within the starting node of the Range.
public void insertNode (Node newNode) throws DOMException RangeException
  Inserts a node into the Document or DocumentFragment at the start of the Range.
public void selectNode (Node refNode) throws RangeException DOMException
  Select a node and its contents
public void selectNodeContents (Node refNode) throws RangeException DOMException
  Select the contents within a node
public void setEnd (Node refNode, int offset) throws RangeException DOMException
  Sets the attributes describing the end of a Range.
public void setEndAfter (Node refNode) throws RangeException DOMException
  Sets the end of a Range to be after a node
public void setEndBefore (Node refNode) throws RangeException DOMException
  Sets the end position to be before a node.
public void setStart (Node refNode, int offset) throws RangeException DOMException
  Sets the attributes describing the start of the Range.
public void setStartAfter (Node refNode) throws RangeException DOMException
  Sets the start position to be after a node
public void setStartBefore (Node refNode) throws RangeException DOMException
  Sets the start position to be before a node
public void surroundContents (Node newParent) throws DOMException RangeException
  Reparents the contents of the Range to the given node and inserts the node at the position of the start of the Range.
public String toString () throws DOMException
  Returns the contents of a Range as a string.
Fields
Hide/Show inherited fields
publicfinalstatic short END_TO_END = "2"
Compare end boundary-point of sourceRange to end boundary-point of Range on which compareBoundaryPoints is invoked.
publicfinalstatic short END_TO_START = "3"
Compare end boundary-point of sourceRange to start boundary-point of Range on which compareBoundaryPoints is invoked.
publicfinalstatic short START_TO_END = "1"
Compare start boundary-point of sourceRange to end boundary-point of Range on which compareBoundaryPoints is invoked.
publicfinalstatic short START_TO_START = "0"
Compare start boundary-point of sourceRange to start boundary-point of Range on which compareBoundaryPoints is invoked.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar