javax.swing.text
public interface AbstractDocument.Content
AbstractDocument
's is stored.
Method Summary | |
---|---|
Position | createPosition(int offset)
Creates a {@link Position} that keeps track of the location at
offset .
|
void | getChars(int where, int len, Segment txt)
Fetches a piece of content and stores it in txt .
|
String | getString(int where, int len)
Returns a piece of content.
|
UndoableEdit | insertString(int where, String str)
Inserts a string into the content model.
|
int | length()
Returns the length of the content.
|
UndoableEdit | remove(int where, int nitems)
Removes a piece of content from the content model.
|
offset
.
Returns: a {@link Position} that keeps track of the location at
offset
.
UNKNOWN: BadLocationException if offset
is not a valid
location in this Content
model
txt
.
Parameters: where the start offset of the requested fragment len the length of the requested fragment txt the Segment
where to fragment is stored into
Throws: BadLocationException if offset
or
offset + len
is not a valid
location in this Content
model
Parameters: where the start offset of the requested fragment len the length of the requested fragment
Returns: the requested fragment
Throws: BadLocationException if offset
or
offset + len
is not a valid
location in this Content
model
Parameters: where the offset at which to insert the string str the string to be inserted
Returns: an UndoableEdit
or null
if undo is
not supported by this Content
model
Throws: BadLocationException if where
is not a valid
location in this Content
model
Returns: the length of the content
Parameters: where the offset at which to remove content nitems the number of characters to be removed
Returns: an UndoableEdit
or null
if undo is
not supported by this Content
model
Throws: BadLocationException if where
is not a valid
location in this Content
model