|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--InsertionPoint
Defined in core.js
Field Summary | |
Object |
_matchLeadingWS
|
Object |
_matchNonWS
|
Object |
_matchTrailingWS
|
Constructor Summary | |
InsertionPoint
(<Text> node, <Integer> offset)
An insertion point is the pair of a text node and an offset within that node which is an approprite location for text to be inserted in the document. |
Method Summary | |
Void
|
_seek(<String> direction)
Sets the node and offset to the next insertion point. |
Void
|
_seekTextNode(<String> direction)
Sets the node to the next text node. |
Void
|
extend()
Extends the selection to the IP. |
Node
|
getNode()
Gets the current node. |
Integer
|
getOffset()
Gets the offset in the current node. |
Void
|
next()
Sets the node and offset to the next insertion point. |
Void
|
previous()
Sets the node and offset to the previous insertion point. |
Void
|
select()
Changes the selection to match the IP. |
Node
|
setNode(<Node> node)
Sets the current node. |
Integer
|
setOffset(<Integer> offset)
Sets the offset in the current node. |
Field Detail |
Object _matchLeadingWS
Object _matchNonWS
Object _matchTrailingWS
Constructor Detail |
InsertionPoint(<Text> node, <Integer> offset)
node
- A text node.
offset
- The offset within that node.
Method Detail |
Void _seek(<String> direction)
If the offset is at the end of the node, the method seeks the next text node. It then measures the length of the whitespace after the offset (if any). Then "moveBy" is set based on the lenght of the result and the CSS white-space mode. If the length takes the offset to the end of the node, the method is called again on the next text node.
direction
- Can be "next" or "previous".
Void _seekTextNode(<String> direction)
direction
- Can be "next" or "previous".
Void extend()
Node getNode()
Integer getOffset()
Void next()
Void previous()
Void select()
Node setNode(<Node> node)
node
- A text node.
Integer setOffset(<Integer> offset)
offset
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |