|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.apache.xerces.dom.RangeImpl
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.
Field Summary | |
(package private) static int |
CLONE_CONTENTS
|
(package private) static int |
DELETE_CONTENTS
|
(package private) static int |
EXTRACT_CONTENTS
|
(package private) Node |
fDeleteNode
|
(package private) boolean |
fDetach
|
(package private) DocumentImpl |
fDocument
|
(package private) Node |
fEndContainer
|
(package private) int |
fEndOffset
|
(package private) Node |
fInsertNode
|
(package private) boolean |
fIsCollapsed
|
(package 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. |
(package private) Node |
fSplitNode
|
(package private) Node |
fStartContainer
|
(package private) int |
fStartOffset
|
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 | |
(package private) void |
checkIndex(Node refNode,
int offset)
|
DocumentFragment |
cloneContents()
|
Range |
cloneRange()
|
void |
collapse(boolean toStart)
|
short |
compareBoundaryPoints(short how,
Range sourceRange)
|
void |
deleteContents()
|
(package private) 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. |
void |
detach()
|
DocumentFragment |
extractContents()
|
boolean |
getCollapsed()
|
Node |
getCommonAncestorContainer()
|
Node |
getEndContainer()
|
int |
getEndOffset()
|
Node |
getStartContainer()
|
int |
getStartOffset()
|
(package private) int |
indexOf(Node child,
Node parent)
what is the index of the child in the parent |
(package private) 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. |
void |
insertedNodeFromDOM(Node node)
This function is called from the DOM. |
void |
insertNode(Node newNode)
|
(package private) boolean |
isAncestorOf(Node a,
Node b)
is a an ancestor of b ? |
(package private) Node |
nextNode(Node node,
boolean visitChildren)
|
(package private) void |
receiveDeletedText(Node node,
int offset,
int count)
This function is called from DOM. |
(package private) void |
receiveInsertedText(Node node,
int index,
int len)
This function is called from DOM. |
(package private) void |
receiveReplacedText(Node node)
This function is called from DOM. |
(package private) void |
receiveSplitData(Node node,
Node newNode,
int offset)
Fix up this Range if another Range has split a Text Node into 2 Nodes. |
(package private) Node |
removeChild(Node parent,
Node child)
|
(package private) 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. |
void |
selectNode(Node refNode)
|
void |
selectNodeContents(Node refNode)
|
void |
setEnd(Node refNode,
int offset)
|
void |
setEndAfter(Node refNode)
|
void |
setEndBefore(Node refNode)
|
void |
setStart(Node refNode,
int offset)
|
void |
setStartAfter(Node refNode)
|
void |
setStartBefore(Node refNode)
|
(package private) void |
signalSplitData(Node node,
Node newNode,
int offset)
Signal other Ranges to update their start/end containers/offsets. |
void |
surroundContents(Node newParent)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
|
Field Detail |
DocumentImpl fDocument
Node fStartContainer
Node fEndContainer
int fStartOffset
int fEndOffset
boolean fIsCollapsed
boolean fDetach
Node fInsertNode
Node fDeleteNode
Node fSplitNode
Node fRemoveChild
static final int EXTRACT_CONTENTS
static final int CLONE_CONTENTS
static final int DELETE_CONTENTS
Constructor Detail |
public RangeImpl(DocumentImpl document)
Method Detail |
public Node getStartContainer()
getStartContainer
in interface Range
public int getStartOffset()
getStartOffset
in interface Range
public Node getEndContainer()
getEndContainer
in interface Range
public int getEndOffset()
getEndOffset
in interface Range
public boolean getCollapsed()
getCollapsed
in interface Range
public Node getCommonAncestorContainer()
getCommonAncestorContainer
in interface Range
public void setStart(Node refNode, int offset) throws RangeException, DOMException
setStart
in interface Range
public void setEnd(Node refNode, int offset) throws RangeException, DOMException
setEnd
in interface Range
public void setStartBefore(Node refNode) throws RangeException
setStartBefore
in interface Range
public void setStartAfter(Node refNode) throws RangeException
setStartAfter
in interface Range
public void setEndBefore(Node refNode) throws RangeException
setEndBefore
in interface Range
public void setEndAfter(Node refNode) throws RangeException
setEndAfter
in interface Range
public void collapse(boolean toStart)
collapse
in interface Range
public void selectNode(Node refNode) throws RangeException
selectNode
in interface Range
public void selectNodeContents(Node refNode) throws RangeException
selectNodeContents
in interface Range
public short compareBoundaryPoints(short how, Range sourceRange) throws DOMException
compareBoundaryPoints
in interface Range
public void deleteContents() throws DOMException
deleteContents
in interface Range
public DocumentFragment extractContents() throws DOMException
extractContents
in interface Range
public DocumentFragment cloneContents() throws DOMException
cloneContents
in interface Range
public void insertNode(Node newNode) throws DOMException, RangeException
insertNode
in interface Range
public void surroundContents(Node newParent) throws DOMException, RangeException
surroundContents
in interface Range
public Range cloneRange()
cloneRange
in interface Range
public String toString()
toString
in interface Range
toString
in class Object
public void detach()
detach
in interface Range
void signalSplitData(Node node, Node newNode, int offset)
void receiveSplitData(Node node, Node newNode, int offset)
void deleteData(CharacterData node, int offset, int count)
void receiveDeletedText(Node node, int offset, int count)
void insertData(CharacterData node, int index, String insert)
void receiveInsertedText(Node node, int index, int len)
void receiveReplacedText(Node node)
public void insertedNodeFromDOM(Node node)
Node removeChild(Node parent, Node child)
void removeNode(Node node)
void checkIndex(Node refNode, int offset) throws DOMException
Node nextNode(Node node, boolean visitChildren)
boolean isAncestorOf(Node a, Node b)
int indexOf(Node child, Node parent)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |