Home » openjdk-7 » javax » swing » text » [javadoc | source]
javax.swing.text
public interface: AbstractDocument.Content [javadoc | source]

All Known Implementing Classes:
    StringContent, GapContent

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.
Method from javax.swing.text.AbstractDocument$Content Summary:
createPosition,   getChars,   getString,   insertString,   length,   remove
Method from javax.swing.text.AbstractDocument$Content Detail:
 public Position createPosition(int offset) throws BadLocationException
    Creates a position within the content that will track change as the content is mutated.
 public  void getChars(int where,
    int len,
    Segment txt) throws BadLocationException
    Gets a sequence of characters and copies them into a Segment.
 public String getString(int where,
    int len) throws BadLocationException
    Fetches a string of characters contained in the sequence.
 public UndoableEdit insertString(int where,
    String str) throws BadLocationException
    Inserts a string of characters into the sequence.
 public int length()
    Current length of the sequence of character content.
 public UndoableEdit remove(int where,
    int nitems) throws BadLocationException
    Removes some portion of the sequence.