public class TextRange extends SimpleTextRange implements java.lang.Comparable
| Constructor and Description |
|---|
TextRange(TextBuffer buffer,
int startOffset,
int endOffset)
Create a text range for a section of the text buffer.
|
| Modifier and Type | Method and Description |
|---|---|
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() |
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 rangepublic void dispose()
public int compareTo(java.lang.Object o)
compareTo in interface java.lang.ComparablecompareTo in class SimpleTextRangepublic int getStartOffset()
getStartOffset in class SimpleTextRangepublic int getEndOffset()
getEndOffset in class SimpleTextRangepublic int getLength()
getLength in class SimpleTextRangepublic boolean contains(int offset)
contains in class SimpleTextRangeoffset - public java.lang.String getText()
throws java.lang.IndexOutOfBoundsException
getText in class SimpleTextRangejava.lang.IndexOutOfBoundsExceptionpublic java.lang.String toString()
toString in class SimpleTextRange