public interface IRange
Modifier and Type | Method and Description |
---|---|
void |
collapse(boolean toStart)
Sets the start and end
Elements and offsets the the same value. |
void |
deleteContents()
Removes the contents of the range from the document.
|
IElement |
getCommonAncestorContainer()
Returns the Element that is a common parent to both start and end container elements
|
IElement |
getEndContainer()
Returns the ending Element of the range.
|
int |
getEndOffset()
Returns the offset into the ending Element that the range finishes.
|
IElement |
getStartContainer()
Returns the starting Element of the range.
|
int |
getStartOffset()
Returns the offset into the starting Element that the range starts.
|
void |
setEnd(IElement node,
int offset)
Sets the end of the Range object to offset places through the given
Element
Currently doesn't function correctly |
void |
setEndAfter(IElement node)
Sets the end of the Range object to the end of given
Element |
void |
setEndBefore(IElement node)
Sets the end of the Range object to the start of given
Element |
void |
setStart(IElement node,
int offset)
Sets the start of the Range object to offset places through the given
Element
Currently doesn't function correctly |
void |
setStartAfter(IElement node)
Sets the start of the Range object to the end of given
Element |
void |
setStartBefore(IElement node)
Sets the start of the Range object to the front of given
Element |
void |
surroundContents(IElement e)
Surrounds the Range with given Element.
|
String |
toString()
Returns the text contents of the range without HTML Markup.
|
void setStart(IElement node, int offset)
Element
node
- Element to start range fromoffset
- places through element to start fromvoid setStartBefore(IElement node)
Element
node
- Element to start range fromvoid setStartAfter(IElement node)
Element
node
- Element to start range fromvoid setEnd(IElement node, int offset)
Element
node
- Element to end range atoffset
- places through element to end atvoid setEndBefore(IElement node)
Element
node
- Element to end range atvoid setEndAfter(IElement node)
Element
node
- Element to end range atvoid collapse(boolean toStart)
Elements
and offsets the the same value.toStart
- If true
use the first Element
.
If false
use the end Element
void deleteContents()
void surroundContents(IElement e)
e
- Element to surround range with.IDocument.createElement(String)
String toString()
IElement getStartContainer()
IElement getEndContainer()
int getStartOffset()
int getEndOffset()
IElement getCommonAncestorContainer()