|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Stores a Range Object (Mozilla Only)
A range can cross a group of Elements and can start or stop half way through an Element
| Method Summary | |
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 docuement. |
IElement |
getCommonAncestorContainer()
Returns the Element that is a common parent to both start and end contianer 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. |
java.lang.String |
toString()
Returns the text contents of the range without HTML Markup. |
| Method Detail |
public void setStart(IElement node,
int offset)
Element
node - Element to start range fromoffset - places through element to start frompublic void setStartBefore(IElement node)
Element
node - Element to start range frompublic void setStartAfter(IElement node)
Element
node - Element to start range from
public void setEnd(IElement node,
int offset)
Element
node - Element to end range atoffset - places through element to end atpublic void setEndBefore(IElement node)
Element
node - Element to end range atpublic void setEndAfter(IElement node)
Element
node - Element to end range atpublic void collapse(boolean toStart)
Elements and offsets the the same value.
toStart - If true use the first Element.
If false use the end Elementpublic void deleteContents()
public void surroundContents(IElement e)
e - Element to surround range with.IDocument.createElement(String)public java.lang.String toString()
public IElement getStartContainer()
public IElement getEndContainer()
public int getStartOffset()
public int getEndOffset()
public IElement getCommonAncestorContainer()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||