Allows developers to provide support for undo/redo in applications such as text editors.
Note: Most of the Swing API is not thread safe. For details, see Concurrency in Swing, a section in The Java Tutorial.
Related DocumentationFor overviews, tutorials, examples, guides, and tool documentation, please see:
- Implementing Undo and Redo, a section in The Java Tutorial
Interface Summary Interface Description StateEditableStateEditable defines the interface for objects that can have their state undone/redone by a StateEdit. UndoableEditAn
UndoableEditrepresents an edit.
Class Summary Class Description AbstractUndoableEditAn abstract implementation of
UndoableEdit, implementing simple responses to all boolean methods in that interface.
CompoundEditA concrete subclass of AbstractUndoableEdit, used to assemble little UndoableEdits into great big ones. StateEditStateEdit is a general edit for objects that change state. UndoableEditSupportA support class used for managing
UndoManagermanages a list of
UndoableEdits, providing a way to undo or redo the appropriate edits.
Exception Summary Exception Description CannotRedoExceptionThrown when an UndoableEdit is told to
CannotUndoExceptionThrown when an UndoableEdit is told to