org.apache.xerces.dom
Class RangeImpl

java.lang.Object
  extended by org.apache.xerces.dom.RangeImpl
All Implemented Interfaces:
org.w3c.dom.ranges.Range

public class RangeImpl
extends java.lang.Object
implements org.w3c.dom.ranges.Range

The RangeImpl class implements the org.w3c.dom.range.Range interface.

Please see the API documentation for the interface classes and use the interfaces in your client programs.

Version:
$Id: RangeImpl.java 515302 2007-03-06 21:07:10Z mrglavas $

INTERNAL:

Usage of this class is not supported. It may be altered or removed at any time.

Field Summary
 
Fields inherited from interface org.w3c.dom.ranges.Range
END_TO_END, END_TO_START, START_TO_END, START_TO_START
 
Constructor Summary
RangeImpl(DocumentImpl document)
          The constructor.
 
Method Summary
 org.w3c.dom.DocumentFragment cloneContents()
           
 org.w3c.dom.ranges.Range cloneRange()
           
 void collapse(boolean toStart)
           
 short compareBoundaryPoints(short how, org.w3c.dom.ranges.Range sourceRange)
           
 void deleteContents()
           
 void detach()
           
 org.w3c.dom.DocumentFragment extractContents()
           
 boolean getCollapsed()
           
 org.w3c.dom.Node getCommonAncestorContainer()
           
 org.w3c.dom.Node getEndContainer()
           
 int getEndOffset()
           
 org.w3c.dom.Node getStartContainer()
           
 int getStartOffset()
           
 void insertedNodeFromDOM(org.w3c.dom.Node node)
          This function is called from the DOM.
 void insertNode(org.w3c.dom.Node newNode)
           
 void selectNode(org.w3c.dom.Node refNode)
           
 void selectNodeContents(org.w3c.dom.Node refNode)
           
 void setEnd(org.w3c.dom.Node refNode, int offset)
           
 void setEndAfter(org.w3c.dom.Node refNode)
           
 void setEndBefore(org.w3c.dom.Node refNode)
           
 void setStart(org.w3c.dom.Node refNode, int offset)
           
 void setStartAfter(org.w3c.dom.Node refNode)
           
 void setStartBefore(org.w3c.dom.Node refNode)
           
 void surroundContents(org.w3c.dom.Node newParent)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RangeImpl

public RangeImpl(DocumentImpl document)
The constructor. Clients must use DocumentRange.createRange(), because it registers the Range with the document, so it can be fixed-up.

Method Detail

getStartContainer

public org.w3c.dom.Node getStartContainer()
Specified by:
getStartContainer in interface org.w3c.dom.ranges.Range

getStartOffset

public int getStartOffset()
Specified by:
getStartOffset in interface org.w3c.dom.ranges.Range

getEndContainer

public org.w3c.dom.Node getEndContainer()
Specified by:
getEndContainer in interface org.w3c.dom.ranges.Range

getEndOffset

public int getEndOffset()
Specified by:
getEndOffset in interface org.w3c.dom.ranges.Range

getCollapsed

public boolean getCollapsed()
Specified by:
getCollapsed in interface org.w3c.dom.ranges.Range

getCommonAncestorContainer

public org.w3c.dom.Node getCommonAncestorContainer()
Specified by:
getCommonAncestorContainer in interface org.w3c.dom.ranges.Range

setStart

public void setStart(org.w3c.dom.Node refNode,
                     int offset)
              throws org.w3c.dom.ranges.RangeException,
                     org.w3c.dom.DOMException
Specified by:
setStart in interface org.w3c.dom.ranges.Range
Throws:
org.w3c.dom.ranges.RangeException
org.w3c.dom.DOMException

setEnd

public void setEnd(org.w3c.dom.Node refNode,
                   int offset)
            throws org.w3c.dom.ranges.RangeException,
                   org.w3c.dom.DOMException
Specified by:
setEnd in interface org.w3c.dom.ranges.Range
Throws:
org.w3c.dom.ranges.RangeException
org.w3c.dom.DOMException

setStartBefore

public void setStartBefore(org.w3c.dom.Node refNode)
                    throws org.w3c.dom.ranges.RangeException
Specified by:
setStartBefore in interface org.w3c.dom.ranges.Range
Throws:
org.w3c.dom.ranges.RangeException

setStartAfter

public void setStartAfter(org.w3c.dom.Node refNode)
                   throws org.w3c.dom.ranges.RangeException
Specified by:
setStartAfter in interface org.w3c.dom.ranges.Range
Throws:
org.w3c.dom.ranges.RangeException

setEndBefore

public void setEndBefore(org.w3c.dom.Node refNode)
                  throws org.w3c.dom.ranges.RangeException
Specified by:
setEndBefore in interface org.w3c.dom.ranges.Range
Throws:
org.w3c.dom.ranges.RangeException

setEndAfter

public void setEndAfter(org.w3c.dom.Node refNode)
                 throws org.w3c.dom.ranges.RangeException
Specified by:
setEndAfter in interface org.w3c.dom.ranges.Range
Throws:
org.w3c.dom.ranges.RangeException

collapse

public void collapse(boolean toStart)
Specified by:
collapse in interface org.w3c.dom.ranges.Range

selectNode

public void selectNode(org.w3c.dom.Node refNode)
                throws org.w3c.dom.ranges.RangeException
Specified by:
selectNode in interface org.w3c.dom.ranges.Range
Throws:
org.w3c.dom.ranges.RangeException

selectNodeContents

public void selectNodeContents(org.w3c.dom.Node refNode)
                        throws org.w3c.dom.ranges.RangeException
Specified by:
selectNodeContents in interface org.w3c.dom.ranges.Range
Throws:
org.w3c.dom.ranges.RangeException

compareBoundaryPoints

public short compareBoundaryPoints(short how,
                                   org.w3c.dom.ranges.Range sourceRange)
                            throws org.w3c.dom.DOMException
Specified by:
compareBoundaryPoints in interface org.w3c.dom.ranges.Range
Throws:
org.w3c.dom.DOMException

deleteContents

public void deleteContents()
                    throws org.w3c.dom.DOMException
Specified by:
deleteContents in interface org.w3c.dom.ranges.Range
Throws:
org.w3c.dom.DOMException

extractContents

public org.w3c.dom.DocumentFragment extractContents()
                                             throws org.w3c.dom.DOMException
Specified by:
extractContents in interface org.w3c.dom.ranges.Range
Throws:
org.w3c.dom.DOMException

cloneContents

public org.w3c.dom.DocumentFragment cloneContents()
                                           throws org.w3c.dom.DOMException
Specified by:
cloneContents in interface org.w3c.dom.ranges.Range
Throws:
org.w3c.dom.DOMException

insertNode

public void insertNode(org.w3c.dom.Node newNode)
                throws org.w3c.dom.DOMException,
                       org.w3c.dom.ranges.RangeException
Specified by:
insertNode in interface org.w3c.dom.ranges.Range
Throws:
org.w3c.dom.DOMException
org.w3c.dom.ranges.RangeException

surroundContents

public void surroundContents(org.w3c.dom.Node newParent)
                      throws org.w3c.dom.DOMException,
                             org.w3c.dom.ranges.RangeException
Specified by:
surroundContents in interface org.w3c.dom.ranges.Range
Throws:
org.w3c.dom.DOMException
org.w3c.dom.ranges.RangeException

cloneRange

public org.w3c.dom.ranges.Range cloneRange()
Specified by:
cloneRange in interface org.w3c.dom.ranges.Range

toString

public java.lang.String toString()
Specified by:
toString in interface org.w3c.dom.ranges.Range
Overrides:
toString in class java.lang.Object

detach

public void detach()
Specified by:
detach in interface org.w3c.dom.ranges.Range

insertedNodeFromDOM

public void insertedNodeFromDOM(org.w3c.dom.Node node)
This function is called from the DOM. This node has already been inserted into the DOM. Fix-up any offsets.



Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.