org.kde.koala
public class Range extends Object implements QtSupport
Constructor Summary | |
---|---|
protected | Range(Class dummy) |
Range() | |
Range(Document rootContainer) | |
Range(Range other) | |
Range(Node startContainer, long startOffset, Node endContainer, long endOffset) |
Method Summary | |
---|---|
boolean | boundaryPointsValid()
not part of the DOM
Compare the boundary-points of a range.
|
DocumentFragment | cloneContents()
Duplicates the contents of a range |
Range | cloneRange()
Produces a new range whose end-points are equal to the
end-points of the range. |
void | collapse(boolean toStart)
Collapse a range onto one of its end-points |
boolean | collapsed()
true if the range is collapsed |
Node | commonAncestorContainer()
Gets the common ancestor container of the range's two end-points.
|
DocumentFragment | createContextualFragment(String html) |
void | deleteContents()
Removes the contents of a range from the containing document or
document fragment without returning a reference to the removed
content. |
void | detach()
Called to indicate that the range is no longer in use and that
the implementation may relinquish any resources associated with
this range. |
Node | endContainer()
Node within which the range ends |
long | endOffset()
Offset within the ending node of the range. |
DocumentFragment | extractContents()
Moves the contents of a range from the containing document or
document fragment to a new DocumentFragment.
|
void | insertNode(Node newNode)
Inserts a node into the document or document fragment at the
start of the range. |
boolean | isDetached()
not part of the DOM
true if the range is detached |
boolean | isNull()
not part of the DOM |
void | selectNode(Node refNode)
Select a node and its contents |
void | selectNodeContents(Node refNode)
Select the contents within a node |
void | setEnd(Node refNode, long offset)
Sets the attributes describing the end of a range. |
void | setEndAfter(Node refNode)
Sets the end of a range to be after a node |
void | setEndBefore(Node refNode)
Sets the end position to be before a node. |
void | setStart(Node refNode, long offset)
Sets the attributes describing the start of the range. |
void | setStartAfter(Node refNode)
Sets the start position to be after a node |
void | setStartBefore(Node refNode)
Sets the start position to be before a node |
Node | startContainer()
Node within which the range begins |
long | startOffset()
Offset within the starting node of the range. |
void | surroundContents(Node newParent)
Reparents the contents of the range to the given node and
inserts the node at the position of the start of the range. |
String | toHTML() |
String | toString()
Returns the contents of a range as a string. |
UNKNOWN:
Returns: A DocumentFragment containing contents equivalent to those of this range.
UNKNOWN: Duplicates the contents of a range
Returns: The duplicated range.
UNKNOWN: Produces a new range whose end-points are equal to the end-points of the range.
Parameters: toStart If true, collapses the Range onto its start; if false, collapses it onto its end.
UNKNOWN: Collapse a range onto one of its end-points
UNKNOWN: true if the range is collapsed
UNKNOWN: Gets the common ancestor container of the range's two end-points.
UNKNOWN: Removes the contents of a range from the containing document or document fragment without returning a reference to the removed content.
UNKNOWN: Called to indicate that the range is no longer in use and that the implementation may relinquish any resources associated with this range.
UNKNOWN: Node within which the range ends
UNKNOWN: Offset within the ending node of the range.
Returns: A DocumentFragment containing the extracted contents.
UNKNOWN: Moves the contents of a range from the containing document or document fragment to a new DocumentFragment.
Parameters: newNode The node to insert at the start of the range
WRONG_DOCUMENT_ERR: Raised if newNode
and the
container of the start of the Range were not created from the
same document.
HIERARCHY_REQUEST_ERR: Raised if the container of the start of
the Range is of a type that does not allow children of the type
of newNode
or if newNode
is an
ancestor of the container .
UNKNOWN: Inserts a node into the document or document fragment at the start of the range.
UNKNOWN: not part of the DOM true if the range is detached
UNKNOWN:
Parameters: refNode The node to select.
UNKNOWN: Select a node and its contents
Parameters: refNode Node to select from
UNKNOWN: Select the contents within a node
Parameters: refNode The refNode
value. This parameter
must be different from null
. offset The endOffset
value.
INVALID_NODE_TYPE_ERR: Raised if refNode
or an
ancestor of refNode
is an Attr, Entity,
Notation, or DocumentType node.
UNKNOWN: Sets the attributes describing the end of a range.
Parameters: refNode Range ends after refNode
.
UNKNOWN: Sets the end of a range to be after a node
Parameters: refNode Range ends before refNode
UNKNOWN: Sets the end position to be before a node.
Parameters: refNode The refNode
value. This parameter
must be different from null
. offset The startOffset
value.
INVALID_NODE_TYPE_ERR: Raised if refNode
or an
ancestor of refNode
is an Attr, Entity,
Notation, or DocumentType node.
If an offset is out-of-bounds, should it just be fixed up or
should an exception be raised.
UNKNOWN: Sets the attributes describing the start of the range.
Parameters: refNode Range starts after refNode
UNKNOWN: Sets the start position to be after a node
Parameters: refNode Range starts before refNode
UNKNOWN: Sets the start position to be before a node
UNKNOWN: Node within which the range begins
UNKNOWN: Offset within the starting node of the range.
Parameters: newParent The node to surround the contents with.
WRONG_DOCUMENT_ERR: Raised if newParent
and the
container of the start of the Range were not created from the
same document.
HIERARCHY_REQUEST_ERR: Raised if the container of the start of
the Range is of a type that does not allow children of the type
of newParent
or if newParent
is
an ancestor of the container or if node
would
end up with a child node of a type not allowed by the type of
node
.
INVALID_NODE_TYPE_ERR: Raised if node
is an
Attr, Entity, DocumentType, Notation, Document, or
DocumentFragment node.
UNKNOWN: Reparents the contents of the range to the given node and inserts the node at the position of the start of the range.
UNKNOWN:
Returns: The contents of the range.
UNKNOWN: Returns the contents of a range as a string.