Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.swing.text
Interface AbstractDocument.Content  view AbstractDocument.Content download AbstractDocument.Content.java

All Known Implementing Classes:
GapContent, StringContent
Enclosing interface:
AbstractDocument

public static interface AbstractDocument.Content

A sequence of data that can be edited. This is were the actual content in AbstractDocument's is stored.


Method Summary
 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.
 java.lang.String getString(int where, int len)
          Returns a piece of content.
 javax.swing.undo.UndoableEdit insertString(int where, java.lang.String str)
          Inserts a string into the content model.
 int length()
          Returns the length of the content.
 javax.swing.undo.UndoableEdit remove(int where, int nitems)
          Removes a piece of content from the content model.
 

Method Detail

createPosition

public Position createPosition(int offset)
                        throws BadLocationException
Creates a Position that keeps track of the location at offset.


length

public int length()
Returns the length of the content.


insertString

public javax.swing.undo.UndoableEdit insertString(int where,
                                                  java.lang.String str)
                                           throws BadLocationException
Inserts a string into the content model.


remove

public javax.swing.undo.UndoableEdit remove(int where,
                                            int nitems)
                                     throws BadLocationException
Removes a piece of content from the content model.


getString

public java.lang.String getString(int where,
                                  int len)
                           throws BadLocationException
Returns a piece of content.


getChars

public void getChars(int where,
                     int len,
                     Segment txt)
              throws BadLocationException
Fetches a piece of content and stores it in txt.