|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Selection
Selection is more like a DOM Range object which represents a portion of a document or a document fragment. This is described as all of the content between two boundary points, the start and end containers. A selection is define by the following properties: startContainer, endContainer, startOffset, endOffset and the text representation of the selection.
Method Summary | |
---|---|
org.w3c.dom.Node |
getEndContainer()
Get the Node that contains the end of this selection. |
int |
getEndOffset()
Get the offset to which the selection ends within the endContainer. |
org.w3c.dom.Node |
getStartContainer()
Get the Node that contains the start of this selection. |
int |
getStartOffset()
Get the offset to which the selection starts within the startContainer. |
void |
init(java.lang.String selection,
org.w3c.dom.Node startContainer,
org.w3c.dom.Node endContainer,
int startOffset,
int endOffset)
Initialize this Selection object. |
boolean |
isValid()
Test if the selection properties have been set. |
java.lang.String |
toString()
Get the text representation of this Selection object. |
Method Detail |
---|
void init(java.lang.String selection, org.w3c.dom.Node startContainer, org.w3c.dom.Node endContainer, int startOffset, int endOffset)
selection
- the text representation of this selectionstartContainer
- the start of this selection is contained
within this nodeendContainer
- the end of this selection is contained within
this nodestartOffset
- the offset to which the selection starts
within the startContainerendOffset
- the offset to which the selection ends within
the endContainerisValid()
java.lang.String toString()
toString
in class java.lang.Object
org.w3c.dom.Node getStartContainer()
org.w3c.dom.Node getEndContainer()
int getStartOffset()
int getEndOffset()
boolean isValid()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |