Package org.loboevolution.html.node
Interface Selection
- All Known Implementing Classes:
SelectionImpl
public interface Selection
A Selection object presents the range of text selected by the user or the
current position of the caret. To obtain a Selection object for examination
or modification, call Window.getSelection().
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addRange.void
collapse.void
collapse.void
collapseToEnd.void
collapseToStart.boolean
containsNode
(Node node) containsNode.boolean
containsNode
(Node node, boolean allowPartialContainment) containsNode.void
deleteFromDocument.void
empty()
empty.void
extend.void
extend.getAnchorNode.int
getAnchorOffset.getFocusNode.int
getFocusOffset.getRangeAt
(int index) getRangeAt.int
getRangeCount.getType()
getType.boolean
isIsCollapsed.void
removeAllRanges.void
removeRange
(Range range) removeRange.void
selectAllChildren
(Node node) selectAllChildren.void
setBaseAndExtent
(Node anchorNode, int anchorOffset, Node focusNode, int focusOffset) setBaseAndExtent.void
setPosition
(Node node) setPosition.void
setPosition
(Node node, int offset) setPosition.
-
Method Details
-
getAnchorNode
Node getAnchorNode()getAnchorNode.
- Returns:
- a
Node
object.
-
getAnchorOffset
int getAnchorOffset()getAnchorOffset.
- Returns:
- a
Integer
object.
-
getFocusNode
Node getFocusNode()getFocusNode.
- Returns:
- a
Node
object.
-
getFocusOffset
int getFocusOffset()getFocusOffset.
- Returns:
- a
Integer
object.
-
isIsCollapsed
boolean isIsCollapsed()isIsCollapsed.
- Returns:
- a boolean.
-
getRangeCount
int getRangeCount()getRangeCount.
- Returns:
- a
Integer
object.
-
getType
String getType()getType.
- Returns:
- a
String
object.
-
addRange
addRange.
- Parameters:
range
- aRange
object.
-
collapse
collapse.
-
collapse
collapse.
- Parameters:
node
- aNode
object.
-
collapseToEnd
void collapseToEnd()collapseToEnd.
-
collapseToStart
void collapseToStart()collapseToStart.
-
containsNode
containsNode.
- Parameters:
node
- aNode
object.allowPartialContainment
- a boolean.- Returns:
- a boolean.
-
containsNode
containsNode.
- Parameters:
node
- aNode
object.- Returns:
- a boolean.
-
deleteFromDocument
void deleteFromDocument()deleteFromDocument.
-
empty
void empty()empty.
-
extend
extend.
-
extend
extend.
- Parameters:
node
- aNode
object.
-
getRangeAt
getRangeAt.
-
removeAllRanges
void removeAllRanges()removeAllRanges.
-
removeRange
removeRange.
- Parameters:
range
- aRange
object.
-
selectAllChildren
selectAllChildren.
- Parameters:
node
- aNode
object.
-
setBaseAndExtent
setBaseAndExtent.
-
setPosition
setPosition.
-
setPosition
setPosition.
- Parameters:
node
- aNode
object.
-