Please see the API documentation for the interface classes and use the interfaces in your client programs.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| private Node | |
| private boolean | |
| private DocumentImpl | |
| private Node | |
| private int | |
| private boolean | |
| private Node | |
| private Node | fRemoveChild
This function is called within Range instead of Node.removeChild, so that the range can remember that it is actively removing this child. |
| private Node | |
| private Node | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| public DocumentFragment | cloneContents()
Implements org. |
| public Range | cloneRange()
Implements org. |
| public void | collapse(boolean
If TRUE, collapses the Range onto its start; if FALSE,
collapses it onto its end. toStart)Implements org. |
| public short | compareBoundaryPoints(short
A code representing the type of comparison, as defined
above. how, Range The sourceRange)Range on which this current
Range is compared to.Implements org. |
| public void | deleteContents()
Implements org. |
| pack-priv void | deleteData(CharacterData node, int offset, int count)
This function inserts text into a Node and invokes a method to fix-up all other Ranges. |
| public void | detach()
Implements org. |
| public DocumentFragment | extractContents()
Implements org. |
| public boolean | |
| public Node | getCommonAncestorContainer()
Implements org. |
| public Node | getEndContainer()
Implements org. |
| public int | getEndOffset()
Implements org. |
| private Node | getRootContainer(Node node)
Given a node, calculate what the Range's root container for that node would be. |
| private Node | Returns: Returns either a child node of the container or the container itself.A container node container, int An offset within the container for which a selected node should
be computed. If the offset is less than zero, or if the offset
is greater than the number of children, the container is returned. offset)Utility method to retrieve a child node by index. |
| public Node | getStartContainer()
Implements org. |
| public int | getStartOffset()
Implements org. |
| private boolean | hasLegalRootContainer(Node node)
Finds the root container for the given node and determines if that root container is legal with respect to the DOM 2 specification. |
| pack-priv int | |
| pack-priv void | insertData(CharacterData node, int index, String insert)
This function inserts text into a Node and invokes a method to fix-up all other Ranges. |
| public void | |
| public void | insertNode(Node
The node to insert at the start of the Range newNode)Implements org. |
| pack-priv boolean | |
| private boolean | |
| private boolean | isLegalContainer(Node node)
Returns true IFF the given node can serve as a container for a range's boundary points. |
| pack-priv Node | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | receiveSplitData(Node node, Node newNode, int offset)
Fix up this Range if another Range has split a Text Node into 2 Nodes. |
| pack-priv Node | |
| pack-priv void | removeNode(Node node)
This function must be called by the DOM _BEFORE_ a node is deleted, because at that time it is connected in the DOM tree, which we depend on. |
| public void | selectNode(Node
The node to select. refNode)Implements org. |
| public void | selectNodeContents(Node
Node to select from refNode)Implements org. |
| public void | setEnd(Node
The refNode, int refNode value. This parameter must be
different from null.The offset)endOffset value.Implements org. |
| public void | setEndAfter(Node
Range ends after refNode)refNode.Implements org. |
| public void | setEndBefore(Node
Range ends before refNode)refNodeImplements org. |
| public void | setStart(Node
The refNode, int refNode value. This parameter must be
different from null.The offset)startOffset value.Implements org. |
| public void | setStartAfter(Node
Range starts after refNode)refNodeImplements org. |
| public void | setStartBefore(Node
Range starts before refNode)refNodeImplements org. |
| pack-priv void | signalSplitData(Node node, Node newNode, int offset)
Signal other Ranges to update their start/end containers/offsets. |
| public void | surroundContents(Node
The node to surround the contents with. newParent)Implements org. |
| public String | toString()
Overrides java. Implements org. |
| private Node | Returns: Returns a node that is the result of visiting the node. If the traversal operation isDELETE_CONTENTS the return value is null.The node to be traversed. n, boolean Is true if we are traversing the node as part of navigating
the "left boundary" of the range. If this value is false,
it implies we are navigating the "right boundary" of the
range. isLeft, int Specifies what type of traversal is being
requested (extract, clone, or delete).
Legal values for this argument are:
how)
Utility method for traversing a node containing character data (either a Text, CDATASection, Comment or ProcessingInstruction node) that we know a-priori to be on a left or right boundary of the range. |
| private DocumentFragment | Returns: Returns a document fragment containing any copied or extracted nodes. If thehow
parameter was DELETE_CONTENTS, the
return value is null.Given a common ancestor of the start and end containers,
this parameter is the ancestor (or self) of the start
container that is a direct child of the common ancestor. startAncestor, Node Given a common ancestor of the start and end containers,
this parameter is the ancestor (or self) of the end
container that is a direct child of the common ancestor. endAncestor, int Specifies what type of traversal is being
requested (extract, clone, or delete).
Legal values for this argument are:
how)
Visits the nodes selected by this range when we know a-priori that the start and end containers are not the same, and we also know that neither the start nor end container is an ancestor of the other. |
| private DocumentFragment | Returns: Returns a document fragment containing any copied or extracted nodes. If thehow
parameter was DELETE_CONTENTS, the
return value is null.The ancestor of the start container that is a direct
child of the end container. startAncestor, int Specifies what type of traversal is being
requested (extract, clone, or delete).
Legal values for this argument are:
how)
Visits the nodes selected by this range when we know a-priori that the start and end containers are not the same, but the end container is an ancestor of the start container. |
| private DocumentFragment | Returns: Returns a document fragment containing any copied or extracted nodes. If thehow
parameter was DELETE_CONTENTS, the
return value is null.The ancestor of the end container that is a direct child
of the start container. endAncestor, int Specifies what type of traversal is being
requested (extract, clone, or delete).
Legal values for this argument are:
how)
Visits the nodes selected by this range when we know a-priori that the start and end containers are not the same, but the start container is an ancestor of the end container. |
| private DocumentFragment | Returns: Returns a document fragment containing any copied or extracted nodes. If thehow
parameter was DELETE_CONTENTS, the
return value is null.Specifies what type of traversal is being
requested (extract, clone, or delete).
Legal values for this argument are:
how)
This is the master routine invoked to visit the nodes selected by this range. |
| private Node | Returns: Returns a node that is the result of visiting the node. If the traversal operation isDELETE_CONTENTS the return value is null.The node to be traversed. n, int Specifies what type of traversal is being
requested (extract, clone, or delete).
Legal values for this argument are:
how)
Utility method for traversing a single node when we know a-priori that the node if fully selected. |
| private Node | Returns: Returns a node that is the result of visiting nodes. If the traversal operation isDELETE_CONTENTS the return value is null.The node that is the root of the "left boundary" subtree. root, int Specifies what type of traversal is being
requested (extract, clone, or delete).
Legal values for this argument are:
how)
Traverses the "left boundary" of this range and
operates on each "boundary node" according to the
|
| private Node | Returns: Returns a node that is the result of visiting the node. If the traversal operation isDELETE_CONTENTS the return value is null.The node to be traversed. n, boolean Set to true if the node is fully selected. Should be
false otherwise.
Note that although the DOM 2 specification says that a
text node that is boththe start and end container is not
selected, we treat it here as if it were partially
selected. isFullySelected, boolean Is true if we are traversing the node as part of navigating
the "left boundary" of the range. If this value is false,
it implies we are navigating the "right boundary" of the
range. isLeft, int Specifies what type of traversal is being
requested (extract, clone, or delete).
Legal values for this argument are:
how)
Utility method for traversing a single node. |
| private Node | Returns: Returns a node that is the result of visiting the node. If the traversal operation isDELETE_CONTENTS the return value is null.The node to be traversed. n, int Specifies what type of traversal is being
requested (extract, clone, or delete).
Legal values for this argument are:
how)
Utility method for traversing a single node when we know a-priori that the node if partially selected and is not a text node. |
| private Node | Returns: Returns a node that is the result of visiting nodes. If the traversal operation isDELETE_CONTENTS the return value is null.The node that is the root of the "right boundary" subtree. root, int Specifies what type of traversal is being
requested (extract, clone, or delete).
Legal values for this argument are:
how)
Traverses the "right boundary" of this range and
operates on each "boundary node" according to the
|
| private DocumentFragment | Returns: Returns a document fragment containing any copied or extracted nodes. If thehow
parameter was DELETE_CONTENTS, the
return value is null.Specifies what type of traversal is being
requested (extract, clone, or delete).
Legal values for this argument are:
how)
Visits the nodes selected by this range when we know a-priori that the start and end containers are the same. |