javax.swing.text
Class PlainDocument

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.text.AbstractDocument sample code for javax.swing.text.AbstractDocument definition code for javax.swing.text.AbstractDocument 
      extended by javax.swing.text.PlainDocument
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Document sample code for javax.swing.text.Document definition code for javax.swing.text.Document

public class PlainDocument
extends AbstractDocument sample code for javax.swing.text.AbstractDocument definition code for javax.swing.text.AbstractDocument

A plain document that maintains no character attributes. The default element structure for this document is a map of the lines in the text. The Element returned by getDefaultRootElement is a map of the lines, and each child element represents a line. This model does not maintain any character level attributes, but each line can be tagged with an arbitrary set of attributes. Line to offset, and offset to line translations can be quickly performed using the default root element. The structure information of the DocumentEvent's fired by edits will indicate the line structure changes.

The default content storage management is performed by a gapped buffer implementation (GapContent). It supports editing reasonably large documents with good efficiency when the edits are contiguous or clustered, as is typical.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see XMLEncoder sample code for java.beans.XMLEncoder definition code for java.beans.XMLEncoder .

See Also:
Document sample code for javax.swing.text.Document definition code for javax.swing.text.Document , AbstractDocument sample code for javax.swing.text.AbstractDocument definition code for javax.swing.text.AbstractDocument , Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.text.AbstractDocument sample code for javax.swing.text.AbstractDocument definition code for javax.swing.text.AbstractDocument
AbstractDocument.AbstractElement sample code for javax.swing.text.AbstractDocument.AbstractElement definition code for javax.swing.text.AbstractDocument.AbstractElement , AbstractDocument.AttributeContext sample code for javax.swing.text.AbstractDocument.AttributeContext definition code for javax.swing.text.AbstractDocument.AttributeContext , AbstractDocument.BranchElement sample code for javax.swing.text.AbstractDocument.BranchElement definition code for javax.swing.text.AbstractDocument.BranchElement , AbstractDocument.Content sample code for javax.swing.text.AbstractDocument.Content definition code for javax.swing.text.AbstractDocument.Content , AbstractDocument.DefaultDocumentEvent sample code for javax.swing.text.AbstractDocument.DefaultDocumentEvent definition code for javax.swing.text.AbstractDocument.DefaultDocumentEvent , AbstractDocument.ElementEdit sample code for javax.swing.text.AbstractDocument.ElementEdit definition code for javax.swing.text.AbstractDocument.ElementEdit , AbstractDocument.LeafElement sample code for javax.swing.text.AbstractDocument.LeafElement definition code for javax.swing.text.AbstractDocument.LeafElement
 
Field Summary
static String sample code for java.lang.String definition code for java.lang.String lineLimitAttribute sample code for javax.swing.text.PlainDocument.lineLimitAttribute definition code for javax.swing.text.PlainDocument.lineLimitAttribute
          Name of the attribute that specifies the maximum length of a line, if there is a maximum length.
static String sample code for java.lang.String definition code for java.lang.String tabSizeAttribute sample code for javax.swing.text.PlainDocument.tabSizeAttribute definition code for javax.swing.text.PlainDocument.tabSizeAttribute
          Name of the attribute that specifies the tab size for tabs contained in the content.
 
Fields inherited from class javax.swing.text.AbstractDocument sample code for javax.swing.text.AbstractDocument definition code for javax.swing.text.AbstractDocument
BAD_LOCATION sample code for javax.swing.text.AbstractDocument.BAD_LOCATION definition code for javax.swing.text.AbstractDocument.BAD_LOCATION , BidiElementName sample code for javax.swing.text.AbstractDocument.BidiElementName definition code for javax.swing.text.AbstractDocument.BidiElementName , ContentElementName sample code for javax.swing.text.AbstractDocument.ContentElementName definition code for javax.swing.text.AbstractDocument.ContentElementName , ElementNameAttribute sample code for javax.swing.text.AbstractDocument.ElementNameAttribute definition code for javax.swing.text.AbstractDocument.ElementNameAttribute , listenerList sample code for javax.swing.text.AbstractDocument.listenerList definition code for javax.swing.text.AbstractDocument.listenerList , ParagraphElementName sample code for javax.swing.text.AbstractDocument.ParagraphElementName definition code for javax.swing.text.AbstractDocument.ParagraphElementName , SectionElementName sample code for javax.swing.text.AbstractDocument.SectionElementName definition code for javax.swing.text.AbstractDocument.SectionElementName
 
Fields inherited from interface javax.swing.text.Document sample code for javax.swing.text.Document definition code for javax.swing.text.Document
StreamDescriptionProperty sample code for javax.swing.text.Document.StreamDescriptionProperty definition code for javax.swing.text.Document.StreamDescriptionProperty , TitleProperty sample code for javax.swing.text.Document.TitleProperty definition code for javax.swing.text.Document.TitleProperty
 
Constructor Summary
PlainDocument sample code for javax.swing.text.PlainDocument.PlainDocument() definition code for javax.swing.text.PlainDocument.PlainDocument() ()
          Constructs a plain text document.
PlainDocument sample code for javax.swing.text.PlainDocument.PlainDocument(javax.swing.text.AbstractDocument.Content) definition code for javax.swing.text.PlainDocument.PlainDocument(javax.swing.text.AbstractDocument.Content) (AbstractDocument.Content sample code for javax.swing.text.AbstractDocument.Content definition code for javax.swing.text.AbstractDocument.Content  c)
          Constructs a plain text document.
 
Method Summary
protected  AbstractDocument.AbstractElement sample code for javax.swing.text.AbstractDocument.AbstractElement definition code for javax.swing.text.AbstractDocument.AbstractElement createDefaultRoot sample code for javax.swing.text.PlainDocument.createDefaultRoot() definition code for javax.swing.text.PlainDocument.createDefaultRoot() ()
          Creates the root element to be used to represent the default document structure.
 Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element getDefaultRootElement sample code for javax.swing.text.PlainDocument.getDefaultRootElement() definition code for javax.swing.text.PlainDocument.getDefaultRootElement() ()
          Gets the default root element for the document model.
 Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element getParagraphElement sample code for javax.swing.text.PlainDocument.getParagraphElement(int) definition code for javax.swing.text.PlainDocument.getParagraphElement(int) (int pos)
          Get the paragraph element containing the given position.
 void insertString sample code for javax.swing.text.PlainDocument.insertString(int, java.lang.String, javax.swing.text.AttributeSet) definition code for javax.swing.text.PlainDocument.insertString(int, java.lang.String, javax.swing.text.AttributeSet) (int offs, String sample code for java.lang.String definition code for java.lang.String  str, AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  a)
          Inserts some content into the document.
protected  void insertUpdate sample code for javax.swing.text.PlainDocument.insertUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AttributeSet) definition code for javax.swing.text.PlainDocument.insertUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AttributeSet) (AbstractDocument.DefaultDocumentEvent sample code for javax.swing.text.AbstractDocument.DefaultDocumentEvent definition code for javax.swing.text.AbstractDocument.DefaultDocumentEvent  chng, AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  attr)
          Updates document structure as a result of text insertion.
protected  void removeUpdate sample code for javax.swing.text.PlainDocument.removeUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent) definition code for javax.swing.text.PlainDocument.removeUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent) (AbstractDocument.DefaultDocumentEvent sample code for javax.swing.text.AbstractDocument.DefaultDocumentEvent definition code for javax.swing.text.AbstractDocument.DefaultDocumentEvent  chng)
          Updates any document structure as a result of text removal.
 
Methods inherited from class javax.swing.text.AbstractDocument sample code for javax.swing.text.AbstractDocument definition code for javax.swing.text.AbstractDocument
addDocumentListener sample code for javax.swing.text.AbstractDocument.addDocumentListener(javax.swing.event.DocumentListener) definition code for javax.swing.text.AbstractDocument.addDocumentListener(javax.swing.event.DocumentListener) , addUndoableEditListener sample code for javax.swing.text.AbstractDocument.addUndoableEditListener(javax.swing.event.UndoableEditListener) definition code for javax.swing.text.AbstractDocument.addUndoableEditListener(javax.swing.event.UndoableEditListener) , createBranchElement sample code for javax.swing.text.AbstractDocument.createBranchElement(javax.swing.text.Element, javax.swing.text.AttributeSet) definition code for javax.swing.text.AbstractDocument.createBranchElement(javax.swing.text.Element, javax.swing.text.AttributeSet) , createLeafElement sample code for javax.swing.text.AbstractDocument.createLeafElement(javax.swing.text.Element, javax.swing.text.AttributeSet, int, int) definition code for javax.swing.text.AbstractDocument.createLeafElement(javax.swing.text.Element, javax.swing.text.AttributeSet, int, int) , createPosition sample code for javax.swing.text.AbstractDocument.createPosition(int) definition code for javax.swing.text.AbstractDocument.createPosition(int) , dump sample code for javax.swing.text.AbstractDocument.dump(java.io.PrintStream) definition code for javax.swing.text.AbstractDocument.dump(java.io.PrintStream) , fireChangedUpdate sample code for javax.swing.text.AbstractDocument.fireChangedUpdate(javax.swing.event.DocumentEvent) definition code for javax.swing.text.AbstractDocument.fireChangedUpdate(javax.swing.event.DocumentEvent) , fireInsertUpdate sample code for javax.swing.text.AbstractDocument.fireInsertUpdate(javax.swing.event.DocumentEvent) definition code for javax.swing.text.AbstractDocument.fireInsertUpdate(javax.swing.event.DocumentEvent) , fireRemoveUpdate sample code for javax.swing.text.AbstractDocument.fireRemoveUpdate(javax.swing.event.DocumentEvent) definition code for javax.swing.text.AbstractDocument.fireRemoveUpdate(javax.swing.event.DocumentEvent) , fireUndoableEditUpdate sample code for javax.swing.text.AbstractDocument.fireUndoableEditUpdate(javax.swing.event.UndoableEditEvent) definition code for javax.swing.text.AbstractDocument.fireUndoableEditUpdate(javax.swing.event.UndoableEditEvent) , getAsynchronousLoadPriority sample code for javax.swing.text.AbstractDocument.getAsynchronousLoadPriority() definition code for javax.swing.text.AbstractDocument.getAsynchronousLoadPriority() , getAttributeContext sample code for javax.swing.text.AbstractDocument.getAttributeContext() definition code for javax.swing.text.AbstractDocument.getAttributeContext() , getBidiRootElement sample code for javax.swing.text.AbstractDocument.getBidiRootElement() definition code for javax.swing.text.AbstractDocument.getBidiRootElement() , getContent sample code for javax.swing.text.AbstractDocument.getContent() definition code for javax.swing.text.AbstractDocument.getContent() , getCurrentWriter sample code for javax.swing.text.AbstractDocument.getCurrentWriter() definition code for javax.swing.text.AbstractDocument.getCurrentWriter() , getDocumentFilter sample code for javax.swing.text.AbstractDocument.getDocumentFilter() definition code for javax.swing.text.AbstractDocument.getDocumentFilter() , getDocumentListeners sample code for javax.swing.text.AbstractDocument.getDocumentListeners() definition code for javax.swing.text.AbstractDocument.getDocumentListeners() , getDocumentProperties sample code for javax.swing.text.AbstractDocument.getDocumentProperties() definition code for javax.swing.text.AbstractDocument.getDocumentProperties() , getEndPosition sample code for javax.swing.text.AbstractDocument.getEndPosition() definition code for javax.swing.text.AbstractDocument.getEndPosition() , getLength sample code for javax.swing.text.AbstractDocument.getLength() definition code for javax.swing.text.AbstractDocument.getLength() , getListeners sample code for javax.swing.text.AbstractDocument.getListeners(java.lang.Class) definition code for javax.swing.text.AbstractDocument.getListeners(java.lang.Class) , getProperty sample code for javax.swing.text.AbstractDocument.getProperty(java.lang.Object) definition code for javax.swing.text.AbstractDocument.getProperty(java.lang.Object) , getRootElements sample code for javax.swing.text.AbstractDocument.getRootElements() definition code for javax.swing.text.AbstractDocument.getRootElements() , getStartPosition sample code for javax.swing.text.AbstractDocument.getStartPosition() definition code for javax.swing.text.AbstractDocument.getStartPosition() , getText sample code for javax.swing.text.AbstractDocument.getText(int, int) definition code for javax.swing.text.AbstractDocument.getText(int, int) , getText sample code for javax.swing.text.AbstractDocument.getText(int, int, javax.swing.text.Segment) definition code for javax.swing.text.AbstractDocument.getText(int, int, javax.swing.text.Segment) , getUndoableEditListeners sample code for javax.swing.text.AbstractDocument.getUndoableEditListeners() definition code for javax.swing.text.AbstractDocument.getUndoableEditListeners() , postRemoveUpdate sample code for javax.swing.text.AbstractDocument.postRemoveUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent) definition code for javax.swing.text.AbstractDocument.postRemoveUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent) , putProperty sample code for javax.swing.text.AbstractDocument.putProperty(java.lang.Object, java.lang.Object) definition code for javax.swing.text.AbstractDocument.putProperty(java.lang.Object, java.lang.Object) , readLock sample code for javax.swing.text.AbstractDocument.readLock() definition code for javax.swing.text.AbstractDocument.readLock() , readUnlock sample code for javax.swing.text.AbstractDocument.readUnlock() definition code for javax.swing.text.AbstractDocument.readUnlock() , remove sample code for javax.swing.text.AbstractDocument.remove(int, int) definition code for javax.swing.text.AbstractDocument.remove(int, int) , removeDocumentListener sample code for javax.swing.text.AbstractDocument.removeDocumentListener(javax.swing.event.DocumentListener) definition code for javax.swing.text.AbstractDocument.removeDocumentListener(javax.swing.event.DocumentListener) , removeUndoableEditListener sample code for javax.swing.text.AbstractDocument.removeUndoableEditListener(javax.swing.event.UndoableEditListener) definition code for javax.swing.text.AbstractDocument.removeUndoableEditListener(javax.swing.event.UndoableEditListener) , render sample code for javax.swing.text.AbstractDocument.render(java.lang.Runnable) definition code for javax.swing.text.AbstractDocument.render(java.lang.Runnable) , replace sample code for javax.swing.text.AbstractDocument.replace(int, int, java.lang.String, javax.swing.text.AttributeSet) definition code for javax.swing.text.AbstractDocument.replace(int, int, java.lang.String, javax.swing.text.AttributeSet) , setAsynchronousLoadPriority sample code for javax.swing.text.AbstractDocument.setAsynchronousLoadPriority(int) definition code for javax.swing.text.AbstractDocument.setAsynchronousLoadPriority(int) , setDocumentFilter sample code for javax.swing.text.AbstractDocument.setDocumentFilter(javax.swing.text.DocumentFilter) definition code for javax.swing.text.AbstractDocument.setDocumentFilter(javax.swing.text.DocumentFilter) , setDocumentProperties sample code for javax.swing.text.AbstractDocument.setDocumentProperties(java.util.Dictionary) definition code for javax.swing.text.AbstractDocument.setDocumentProperties(java.util.Dictionary) , writeLock sample code for javax.swing.text.AbstractDocument.writeLock() definition code for javax.swing.text.AbstractDocument.writeLock() , writeUnlock sample code for javax.swing.text.AbstractDocument.writeUnlock() definition code for javax.swing.text.AbstractDocument.writeUnlock()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

tabSizeAttribute sample code for javax.swing.text.PlainDocument.tabSizeAttribute

public static final String sample code for java.lang.String definition code for java.lang.String  tabSizeAttribute
Name of the attribute that specifies the tab size for tabs contained in the content. The type for the value is Integer.

See Also:
Constant Field Values

lineLimitAttribute sample code for javax.swing.text.PlainDocument.lineLimitAttribute

public static final String sample code for java.lang.String definition code for java.lang.String  lineLimitAttribute
Name of the attribute that specifies the maximum length of a line, if there is a maximum length. The type for the value is Integer.

See Also:
Constant Field Values
Constructor Detail

PlainDocument sample code for javax.swing.text.PlainDocument() definition code for javax.swing.text.PlainDocument()

public PlainDocument()
Constructs a plain text document. A default model using GapContent is constructed and set.


PlainDocument sample code for javax.swing.text.PlainDocument(javax.swing.text.AbstractDocument.Content) definition code for javax.swing.text.PlainDocument(javax.swing.text.AbstractDocument.Content)

public PlainDocument(AbstractDocument.Content sample code for javax.swing.text.AbstractDocument.Content definition code for javax.swing.text.AbstractDocument.Content  c)
Constructs a plain text document. A default root element is created, and the tab size set to 8.

Parameters:
c - the container for the content
Method Detail

insertString sample code for javax.swing.text.PlainDocument.insertString(int, java.lang.String, javax.swing.text.AttributeSet) definition code for javax.swing.text.PlainDocument.insertString(int, java.lang.String, javax.swing.text.AttributeSet)

public void insertString(int offs,
                         String sample code for java.lang.String definition code for java.lang.String  str,
                         AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  a)
                  throws BadLocationException sample code for javax.swing.text.BadLocationException definition code for javax.swing.text.BadLocationException 
Inserts some content into the document. Inserting content causes a write lock to be held while the actual changes are taking place, followed by notification to the observers on the thread that grabbed the write lock.

This method is thread safe, although most Swing methods are not. Please see Threads and Swing for more information.

Specified by:
insertString sample code for javax.swing.text.Document.insertString(int, java.lang.String, javax.swing.text.AttributeSet) definition code for javax.swing.text.Document.insertString(int, java.lang.String, javax.swing.text.AttributeSet) in interface Document sample code for javax.swing.text.Document definition code for javax.swing.text.Document
Overrides:
insertString sample code for javax.swing.text.AbstractDocument.insertString(int, java.lang.String, javax.swing.text.AttributeSet) definition code for javax.swing.text.AbstractDocument.insertString(int, java.lang.String, javax.swing.text.AttributeSet) in class AbstractDocument sample code for javax.swing.text.AbstractDocument definition code for javax.swing.text.AbstractDocument
Parameters:
offs - the starting offset >= 0
str - the string to insert; does nothing with null/empty strings
a - the attributes for the inserted content
Throws:
BadLocationException sample code for javax.swing.text.BadLocationException definition code for javax.swing.text.BadLocationException - the given insert position is not a valid position within the document
See Also:
Document.insertString(int, java.lang.String, javax.swing.text.AttributeSet) sample code for javax.swing.text.Document.insertString(int, java.lang.String, javax.swing.text.AttributeSet) definition code for javax.swing.text.Document.insertString(int, java.lang.String, javax.swing.text.AttributeSet)

getDefaultRootElement sample code for javax.swing.text.PlainDocument.getDefaultRootElement() definition code for javax.swing.text.PlainDocument.getDefaultRootElement()

public Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  getDefaultRootElement()
Gets the default root element for the document model.

Specified by:
getDefaultRootElement sample code for javax.swing.text.Document.getDefaultRootElement() definition code for javax.swing.text.Document.getDefaultRootElement() in interface Document sample code for javax.swing.text.Document definition code for javax.swing.text.Document
Specified by:
getDefaultRootElement sample code for javax.swing.text.AbstractDocument.getDefaultRootElement() definition code for javax.swing.text.AbstractDocument.getDefaultRootElement() in class AbstractDocument sample code for javax.swing.text.AbstractDocument definition code for javax.swing.text.AbstractDocument
Returns:
the root
See Also:
Document.getDefaultRootElement() sample code for javax.swing.text.Document.getDefaultRootElement() definition code for javax.swing.text.Document.getDefaultRootElement()

createDefaultRoot sample code for javax.swing.text.PlainDocument.createDefaultRoot() definition code for javax.swing.text.PlainDocument.createDefaultRoot()

protected AbstractDocument.AbstractElement sample code for javax.swing.text.AbstractDocument.AbstractElement definition code for javax.swing.text.AbstractDocument.AbstractElement  createDefaultRoot()
Creates the root element to be used to represent the default document structure.

Returns:
the element base

getParagraphElement sample code for javax.swing.text.PlainDocument.getParagraphElement(int) definition code for javax.swing.text.PlainDocument.getParagraphElement(int)

public Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  getParagraphElement(int pos)
Get the paragraph element containing the given position. Since this document only models lines, it returns the line instead.

Specified by:
getParagraphElement sample code for javax.swing.text.AbstractDocument.getParagraphElement(int) definition code for javax.swing.text.AbstractDocument.getParagraphElement(int) in class AbstractDocument sample code for javax.swing.text.AbstractDocument definition code for javax.swing.text.AbstractDocument
Parameters:
pos - the starting offset >= 0
Returns:
the element

insertUpdate sample code for javax.swing.text.PlainDocument.insertUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AttributeSet) definition code for javax.swing.text.PlainDocument.insertUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AttributeSet)

protected void insertUpdate(AbstractDocument.DefaultDocumentEvent sample code for javax.swing.text.AbstractDocument.DefaultDocumentEvent definition code for javax.swing.text.AbstractDocument.DefaultDocumentEvent  chng,
                            AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  attr)
Updates document structure as a result of text insertion. This will happen within a write lock. Since this document simply maps out lines, we refresh the line map.

Overrides:
insertUpdate sample code for javax.swing.text.AbstractDocument.insertUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AttributeSet) definition code for javax.swing.text.AbstractDocument.insertUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AttributeSet) in class AbstractDocument sample code for javax.swing.text.AbstractDocument definition code for javax.swing.text.AbstractDocument
Parameters:
chng - the change event describing the dit
attr - the set of attributes for the inserted text

removeUpdate sample code for javax.swing.text.PlainDocument.removeUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent) definition code for javax.swing.text.PlainDocument.removeUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent)

protected void removeUpdate(AbstractDocument.DefaultDocumentEvent sample code for javax.swing.text.AbstractDocument.DefaultDocumentEvent definition code for javax.swing.text.AbstractDocument.DefaultDocumentEvent  chng)
Updates any document structure as a result of text removal. This will happen within a write lock. Since the structure represents a line map, this just checks to see if the removal spans lines. If it does, the two lines outside of the removal area are joined together.

Overrides:
removeUpdate sample code for javax.swing.text.AbstractDocument.removeUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent) definition code for javax.swing.text.AbstractDocument.removeUpdate(javax.swing.text.AbstractDocument.DefaultDocumentEvent) in class AbstractDocument sample code for javax.swing.text.AbstractDocument definition code for javax.swing.text.AbstractDocument
Parameters:
chng - the change event describing the edit