API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.swing.text. StringContent View Source
Author(s)
Timothy Prinzing
Since
Version
1.45 11/17/05
Serial
Hierarchy
 Object
      StringContent
Implements
 AbstractDocument.Content
 Serializable
Subclasses
Description
publicfinal class StringContent
  An implementation of the AbstractDocument.Content interface that is a brute force implementation that is useful for relatively small documents and/or debugging.
See also:   
Constructors
public StringContent ()
  Creates a new StringContent object.
public StringContent (int initialLength)
  Creates a new StringContent object, with the initial size specified.
Methods
Hide/Show inherited methods
public Position createPosition (int offset) throws BadLocationException [Specified in AbstractDocument.Content]
  Creates a position within the content that will track change as the content is mutated.
public void getChars (int where, int len, Segment chars) throws BadLocationException [Specified in AbstractDocument.Content]
  Retrieves a portion of the content.
protected Vector getPositionsInRange (Vector v, int offset, int length)
  Returns a Vector containing instances of UndoPosRef for the Positions in the range offset to offset + length.
public String getString (int where, int len) throws BadLocationException [Specified in AbstractDocument.Content]
  Retrieves a portion of the content.
public UndoableEdit insertString (int where, String str) throws BadLocationException [Specified in AbstractDocument.Content]
  Inserts a string into the content.
public int length () [Specified in AbstractDocument.Content]
  Returns the length of the content.
public UndoableEdit remove (int where, int nitems) throws BadLocationException [Specified in AbstractDocument.Content]
  Removes part of the content.
pack-private void replace (int offset, int length, char[] replArray, int replOffset, int replLength)
  Replaces some of the characters in the array
pack-private void resize (int ncount)
pack-privatesynchronized void updateMarksForInsert (int offset, int length)
pack-privatesynchronized void updateMarksForRemove (int offset, int length)
protected void updateUndoPositions (Vector positions)
  Resets the location for all the UndoPosRef instances in positions.
Fields
Hide/Show inherited fields
pack-privatetransient Vector marks
Nested Classes
  StringContent.PosRec
holds the data for a mark...
  StringContent.StickyPosition
This really wants to be a weak reference but in 1.1 we don't have a 100% pure solution for this...
  StringContent.UndoPosRef
Used to hold a reference to a Position that is being reset as the result of removing from the content.
  StringContent.InsertUndo
UnoableEdit created for inserts.
  StringContent.RemoveUndo
UndoableEdit created for removes.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar