|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.0) E52944-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.javatools.editor.TextRange
public class TextRange
A representation of a contiguous range of characters in a TextBuffer. The TextRange uses OffsetMarks to track changes in the buffer so the range continues to cover the expected text as edits are made to the buffer. It is for this reason that dispose() must be called on the range when it is no longer needed, otherwise the OffsetMarks will remain (leaked) in the TextBuffer. The smallest range is one character long, having the same start and end offsets. The behaviour of the TextRange after dispose() has been called is undefined
Constructor Summary | |
---|---|
TextRange(TextBuffer buffer, int startOffset, int endOffset) Create a text range for a section of the text buffer. |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o) |
boolean |
contains(int offset) |
void |
dispose() Free up resources used to track this range in the buffer. |
int |
getEndOffset() |
int |
getLength() |
int |
getStartOffset() |
java.lang.String |
getText() |
java.lang.String |
toString() |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TextRange(TextBuffer buffer, int startOffset, int endOffset)
buffer
-startOffset
- the first offset to be included in the rangeendOffset
- the last offset to be included in the rangeMethod Detail |
---|
public void dispose()
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public int getStartOffset()
public int getEndOffset()
public int getLength()
public boolean contains(int offset)
offset
-public java.lang.String getText() throws java.lang.IndexOutOfBoundsException
java.lang.IndexOutOfBoundsException
public java.lang.String toString()
toString
in class java.lang.Object
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.0) E52944-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |