public static interface AbstractDocument.Content
AbstractDocument
Modifier and Type | Method and Description |
---|---|
Position |
createPosition(int offset)
Creates a position within the content that will
track change as the content is mutated.
|
void |
getChars(int where,
int len,
Segment txt)
Gets a sequence of characters and copies them into a Segment.
|
String |
getString(int where,
int len)
Fetches a string of characters contained in the sequence.
|
UndoableEdit |
insertString(int where,
String str)
Inserts a string of characters into the sequence.
|
int |
length()
Current length of the sequence of character content.
|
UndoableEdit |
remove(int where,
int nitems)
Removes some portion of the sequence.
|
Position createPosition(int offset) throws BadLocationException
BadLocationException
- for an invalid offsetoffset
- the offset in the content >= 0int length()
UndoableEdit insertString(int where, String str) throws BadLocationException
BadLocationException
- thrown if the area covered by
the arguments is not contained in the character sequencewhere
- offset into the sequence to make the insertion >= 0str
- string to insertEdit
implementation will be returned,
otherwise returns null
UndoableEdit remove(int where, int nitems) throws BadLocationException
BadLocationException
- Thrown if the area covered by
the arguments is not contained in the character sequence.where
- The offset into the sequence to make the
insertion >= 0.nitems
- The number of items in the sequence to remove >= 0.String getString(int where, int len) throws BadLocationException
BadLocationException
- Thrown if the area covered by
the arguments is not contained in the character sequence.where
- Offset into the sequence to fetch >= 0.len
- number of characters to copy >= 0.void getChars(int where, int len, Segment txt) throws BadLocationException
BadLocationException
- Thrown if the area covered by
the arguments is not contained in the character sequence.where
- the starting offset >= 0len
- the number of characters >= 0txt
- the target location to copy intoaicas GmbH, Karlsruhe, Germany —www.aicas.com
Copyright © 2001-2019 aicas GmbH. All Rights Reserved.