|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cometway.text.TextRange
public class TextRange
A representation of a range of text in an ITextBuffer.
| Constructor Summary | |
|---|---|
TextRange()
Creates an empty TextRange. |
|
TextRange(ITextBuffer b)
Creates a TextRange with the given ITextBuffer. |
|
TextRange(ITextBuffer b,
int fromIndex,
int toIndex)
Creates a TextRange with the given ITextBuffer and the start and end positions of the range. |
|
TextRange(TextPointer from,
TextPointer to)
Creates a TextRange with the given two TextPointers. |
|
| Method Summary | |
|---|---|
void |
delete()
Deletes the range of text in the ITextBuffer associated with this TextRange. |
void |
dispose()
Disposes this TextRange. |
boolean |
equals(java.lang.Object obj)
overrides Object.equals() |
protected void |
finalize()
|
int |
getEnd()
|
TextPointer |
getEndPointer()
|
int |
getLength()
|
int |
getStart()
|
TextPointer |
getStartPointer()
|
java.lang.String |
getText()
|
ITextBuffer |
getTextBuffer()
|
void |
offset(int relativeStart,
int relativeEnd)
Offsets the current range by offsetting the TextPointers pointing to the beginning and end of the range. |
void |
setEnd(int end)
Sets the end position of this TextRange. |
void |
setEndPointer(TextPointer p)
Sets the end position of this TextRange. |
void |
setLength(int size)
Sets the length of this TextRange with respect to the beginning position of the range. |
void |
setStart(int start)
Sets the start position of this TextRange. |
void |
setStartPointer(TextPointer p)
Sets the start position of this TextRange. |
void |
setText(java.lang.String s)
Replaces the range of text in the ITextBuffer associated with this TextRange with the given String parameter. |
void |
setTextBuffer(ITextBuffer b)
Sets the ITextBuffer which is associated with this TextRange. |
java.lang.String |
toString()
overrides Object.toString(). |
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TextRange()
public TextRange(ITextBuffer b)
public TextRange(ITextBuffer b,
int fromIndex,
int toIndex)
public TextRange(TextPointer from,
TextPointer to)
| Method Detail |
|---|
public void delete()
public void dispose()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Object
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic int getEnd()
public TextPointer getEndPointer()
public int getLength()
public int getStart()
public TextPointer getStartPointer()
public java.lang.String getText()
public ITextBuffer getTextBuffer()
public void offset(int relativeStart,
int relativeEnd)
public void setEnd(int end)
public void setEndPointer(TextPointer p)
public void setLength(int size)
public void setStart(int start)
public void setStartPointer(TextPointer p)
public void setText(java.lang.String s)
public void setTextBuffer(ITextBuffer b)
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||