|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ITextBuffer
This interface defines an interface for reading and manipulating a buffer of text.
| Method Summary | |
|---|---|
void |
addTextBufferListener(ITextBufferListener l)
Adds an ITextBufferListener to this object to receive notifications of changes which take place when the text buffer is changed. |
void |
append(java.lang.String str)
Appends the specified string to the end of this object and calls the textChanged method of its listeners with the range
of the appended text. |
void |
delete(int fromIndex,
int toIndex)
Removes the specified range of text from this object and calls the textChanged method of its listeners with the location
of the removed text. |
TextRange |
findText(int fromIndex,
ITextFinder textFinder)
Returns the next text range in the text buffer found by the specified text finder starting at the specified index. |
int |
getLength()
Returns the size of the text buffer managed by this object. |
java.lang.String |
getText()
Returns a string representing the contents of the text buffer. |
java.lang.String |
getText(int fromIndex,
int toIndex)
Returns a string representing the contents of the text buffer contained within the specified range. |
int |
indexOf(char ch,
int fromIndex)
Returns the index of the first occurence of the specified character starting at the specified location and continuing to the end of the buffer. |
void |
insertText(java.lang.String str,
int atIndex)
Inserts a string into the text buffer at the specified location and calls the textChanged method of its listeners with the location
of the inserted text. |
int |
prevIndexOf(char ch,
int fromIndex)
Returns the index of the previous occurence of the specified character starting at the specified location and continuing to the end of the buffer. |
void |
removeTextBufferListener(ITextBufferListener l)
Removes an ITextBufferListener from this object. |
void |
setText(java.lang.String str)
Sets the value of this text buffer to the specified String. |
| Method Detail |
|---|
void addTextBufferListener(ITextBufferListener l)
l - a reference to an object which implements ITextBufferListener.void append(java.lang.String str)
textChanged method of its listeners with the range
of the appended text.
str - a reference to a String.
void delete(int fromIndex,
int toIndex)
textChanged method of its listeners with the location
of the removed text. The fromIndex and toIndex
parameters may be specified in any order.
fromIndex - the starting index from where text will be removed.toIndex - the ending index to where text will be removed.
TextRange findText(int fromIndex,
ITextFinder textFinder)
fromIndex - the starting index from where search will begin.textFinder - a reference to an object implementing ITextFinder.
int getLength()
java.lang.String getText()
java.lang.String getText(int fromIndex,
int toIndex)
fromIndex
and toIndex parameters may be specified in any order.
fromIndex - the starting index from where text will be taken.toIndex - the ending index to where text will be taken.
int indexOf(char ch,
int fromIndex)
ch - the character to match.fromIndex - the starting index from where the search will begin.
void insertText(java.lang.String str,
int atIndex)
textChanged method of its listeners with the location
of the inserted text.
str - a reference to a String.atIndex - the index of the location where the text should be inserted.
int prevIndexOf(char ch,
int fromIndex)
ch - the character to match.fromIndex - the starting index from where the search will begin.
void removeTextBufferListener(ITextBufferListener l)
l - a reference to an object which implements ITextBufferListener.void setText(java.lang.String str)
str - a reference to a String.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||