|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectswingwtx.swing.text.StringContent
This class is used to represent document content with a StringBuffer. Hopefully it should be efficient enough.
| Constructor Summary | |
StringContent()
|
|
StringContent(int initialSize)
|
|
| Method Summary | |
Position |
createPosition(int offset)
Creates an anonymous class implementing Position for the
offset given. |
void |
getChars(int where,
int len,
Segment txt)
Assigns the specified substring to the passed Segment |
java.lang.String |
getString(int where,
int len)
Retrieves a string from the content |
UndoableEdit |
insertString(int where,
java.lang.String str)
Inserts a string into the content at the specified position. |
int |
length()
Returns the content length |
UndoableEdit |
remove(int where,
int nitems)
Removes nitems chars from the content at the specified position. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public StringContent()
public StringContent(int initialSize)
| Method Detail |
public Position createPosition(int offset)
throws BadLocationException
Position for the
offset given.
createPosition in interface AbstractDocument.ContentBadLocationExceptionpublic int length()
length in interface AbstractDocument.Content
public UndoableEdit insertString(int where,
java.lang.String str)
throws BadLocationException
insertString in interface AbstractDocument.ContentBadLocationException - if the position is invalid
FIXME: UNDO needs implementing
public UndoableEdit remove(int where,
int nitems)
throws BadLocationException
remove in interface AbstractDocument.ContentBadLocationException - if the position is invalid
FIXME: UNDO needs implementing
public java.lang.String getString(int where,
int len)
throws BadLocationException
getString in interface AbstractDocument.Contentwhere - The offsetlen - The length of the string
BadLocationException - if the position is invalid
public void getChars(int where,
int len,
Segment txt)
throws BadLocationException
getChars in interface AbstractDocument.Contentwhere - The offsetlen - The lengthtxt - The segment object to put the substring in
BadLocationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||