| Package | Description | 
|---|---|
| javax.swing.event | Provides for events fired by Swing components. | 
| javax.swing.text | Provides classes and interfaces that deal with editable
and noneditable text components. | 
| javax.swing.undo | Allows developers to provide support for undo/redo
in applications such as text editors. | 
| Modifier and Type | Method and Description | 
|---|---|
| UndoableEdit | UndoableEditEvent. getEdit()Returns the edit value. | 
| Constructor and Description | 
|---|
| UndoableEditEvent(Object source,
                 UndoableEdit edit)Constructs an UndoableEditEvent object. | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | AbstractDocument.DefaultDocumentEventStores document changes as the document is being
 modified. | 
| static class  | AbstractDocument.ElementEditAn implementation of ElementChange that can be added to the document
 event. | 
| static class  | DefaultStyledDocument.AttributeUndoableEditAn UndoableEdit used to remember AttributeSet changes to an
 Element. | 
| Modifier and Type | Method and Description | 
|---|---|
| UndoableEdit | AbstractDocument.Content. insertString(int where,
            String str)Inserts a string of characters into the sequence. | 
| UndoableEdit | GapContent. insertString(int where,
            String str)Inserts a string into the content. | 
| UndoableEdit | StringContent. insertString(int where,
            String str)Inserts a string into the content. | 
| UndoableEdit | AbstractDocument.Content. remove(int where,
      int nitems)Removes some portion of the sequence. | 
| UndoableEdit | GapContent. remove(int where,
      int nitems)Removes part of the content. | 
| UndoableEdit | StringContent. remove(int where,
      int nitems)Removes part of the content. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | AbstractDocument.DefaultDocumentEvent. addEdit(UndoableEdit anEdit)Adds a document edit. | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | AbstractUndoableEditAn abstract implementation of  UndoableEdit,
 implementing simple responses to all boolean methods in
 that interface. | 
| class  | CompoundEditA concrete subclass of AbstractUndoableEdit, used to assemble little
 UndoableEdits into great big ones. | 
| class  | StateEditStateEdit is a general edit for objects that change state. | 
| class  | UndoManagerUndoManagermanages a list ofUndoableEdits,
 providing a way to undo or redo the appropriate edits. | 
| Modifier and Type | Field and Description | 
|---|---|
| protected Vector<UndoableEdit> | CompoundEdit. editsThe collection of  UndoableEdits
 undone/redone en masse by thisCompoundEdit. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected UndoableEdit | UndoManager. editToBeRedone()Returns the the next significant edit to be redone if  redois invoked. | 
| protected UndoableEdit | UndoManager. editToBeUndone()Returns the the next significant edit to be undone if  undois invoked. | 
| protected UndoableEdit | CompoundEdit. lastEdit()Returns the last  UndoableEditinedits, ornullifeditsis empty. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | UndoableEditSupport. _postEdit(UndoableEdit e)Called only from  postEditandendUpdate. | 
| boolean | CompoundEdit. addEdit(UndoableEdit anEdit)If this edit is  inProgress,
 acceptsanEditand returns true. | 
| boolean | AbstractUndoableEdit. addEdit(UndoableEdit anEdit)This default implementation returns false. | 
| boolean | UndoableEdit. addEdit(UndoableEdit anEdit)Adds an  UndoableEditto thisUndoableEdit. | 
| boolean | UndoManager. addEdit(UndoableEdit anEdit)Adds an  UndoableEditto thisUndoManager, if it's possible. | 
| void | UndoableEditSupport. postEdit(UndoableEdit e)DEADLOCK WARNING: Calling this method may call
  undoableEditHappenedin all listeners. | 
| protected void | UndoManager. redoTo(UndoableEdit edit)Redoes all changes from the index of the next edit to
  edit, updating the index of the next edit appropriately. | 
| boolean | AbstractUndoableEdit. replaceEdit(UndoableEdit anEdit)This default implementation returns false. | 
| boolean | UndoableEdit. replaceEdit(UndoableEdit anEdit)Returns true if this  UndoableEditshould replaceanEdit. | 
| protected void | UndoManager. undoTo(UndoableEdit edit)Undoes all changes from the index of the next edit to
  edit, updating the index of the next edit appropriately. | 
 Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2015, Oracle and/or its affiliates.  All rights reserved.