Save This Page
Home » openjdk-7 » org.w3c » dom » range » [javadoc | source]
org.w3c.dom.range
public interface: Range [javadoc | source]
Field Summary
public static final  short START_TO_START     
public static final  short START_TO_END     
public static final  short END_TO_END     
public static final  short END_TO_START     
Method from org.w3c.dom.range.Range Summary:
cloneContents,   cloneRange,   collapse,   compareBoundaryPoints,   deleteContents,   detach,   extractContents,   getCollapsed,   getCommonAncestorContainer,   getEndContainer,   getEndOffset,   getStartContainer,   getStartOffset,   insertNode,   selectNode,   selectNodeContents,   setEnd,   setEndAfter,   setEndBefore,   setStart,   setStartAfter,   setStartBefore,   surroundContents,   toString
Method from org.w3c.dom.range.Range Detail:
 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. Subsequent calls to any methods or attribute getters on this range will result in a DOMException being thrown with an error code of INVALID_STATE_ERR .
 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 RangeException, DOMException
    Inserts a node into the document or document fragment 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 RangeException, DOMException
    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.