javax.swing.text.AbstractDocument.Content |
![]() |
Interface to describe a sequence of character content that can be edited. Implementations may or may not support a history mechanism which will be reflected by whether or not mutations return an UndoableEdit implementation.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a position within the content that will
track change as the content is mutated.
| |||||||||||
Gets a sequence of characters and copies them into a Segment.
| |||||||||||
Fetches a string of characters contained in the sequence.
| |||||||||||
Inserts a string of characters into the sequence.
| |||||||||||
Current length of the sequence of character content.
| |||||||||||
Removes some portion of the sequence.
|
Creates a position within the content that will track change as the content is mutated.
offset | the offset in the content >= 0 |
---|
BadLocationException | for an invalid offset |
---|
Gets a sequence of characters and copies them into a Segment.
where | the starting offset >= 0 |
---|---|
len | the number of characters >= 0 |
txt | the target location to copy into |
BadLocationException | Thrown if the area covered by the arguments is not contained in the character sequence. |
---|
Fetches a string of characters contained in the sequence.
where | Offset into the sequence to fetch >= 0. |
---|---|
len | number of characters to copy >= 0. |
BadLocationException | Thrown if the area covered by the arguments is not contained in the character sequence. |
---|
Inserts a string of characters into the sequence.
where | offset into the sequence to make the insertion >= 0 |
---|---|
str | string to insert |
Edit
implementation will be returned,
otherwise returns null
BadLocationException | thrown if the area covered by the arguments is not contained in the character sequence |
---|
Current length of the sequence of character content.
Removes some portion of the sequence.
where | The offset into the sequence to make the insertion >= 0. |
---|---|
nitems | The number of items in the sequence to remove >= 0. |
BadLocationException | Thrown if the area covered by the arguments is not contained in the character sequence. |
---|