public static interface AbstractDocument.Content
AbstractDocument
's is stored.Modifier and Type | Method and Description |
---|---|
Position |
createPosition(int offset)
Creates a
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.
|
Position createPosition(int offset) throws BadLocationException
Position
that keeps track of the location at
offset
.Position
that keeps track of the location at
offset
.BadLocationException
int length()
UndoableEdit insertString(int where, String str) throws BadLocationException
where
- the offset at which to insert the stringstr
- the string to be insertedUndoableEdit
or null
if undo is
not supported by this Content
modelBadLocationException
- if where
is not a valid
location in this Content
modelUndoableEdit remove(int where, int nitems) throws BadLocationException
where
- the offset at which to remove contentnitems
- the number of characters to be removedUndoableEdit
or null
if undo is
not supported by this Content
modelBadLocationException
- if where
is not a valid
location in this Content
modelString getString(int where, int len) throws BadLocationException
where
- the start offset of the requested fragmentlen
- the length of the requested fragmentBadLocationException
- if offset
or
offset + len
is not a valid
location in this Content
modelvoid getChars(int where, int len, Segment txt) throws BadLocationException
txt
.where
- the start offset of the requested fragmentlen
- the length of the requested fragmenttxt
- the Segment
where to fragment is stored intoBadLocationException
- if offset
or
offset + len
is not a valid
location in this Content
model