Uses of Interface
javax.swing.undo.UndoableEdit
Package
Description
Provides for events fired by Swing components.
Provides classes and interfaces that deal with editable and noneditable text
components.
Allows developers to provide support for undo/redo in applications such as
text editors.
-
Uses of UndoableEdit in javax.swing.event
ModifierConstructorDescriptionUndoableEditEvent(Object source, UndoableEdit edit)
Constructs an UndoableEditEvent object. -
Uses of UndoableEdit in javax.swing.text
Modifier and TypeClassDescriptionclass
Stores document changes as the document is being modified.static class
An implementation of ElementChange that can be added to the document event.static class
An UndoableEdit used to remember AttributeSet changes to an Element.Modifier and TypeMethodDescriptionAbstractDocument.Content.insertString(int where, String str)
Inserts a string of characters into the sequence.GapContent.insertString(int where, String str)
Inserts a string into the content.StringContent.insertString(int where, String str)
Inserts a string into the content.AbstractDocument.Content.remove(int where, int nitems)
Removes some portion of the sequence.GapContent.remove(int where, int nitems)
Removes part of the content.StringContent.remove(int where, int nitems)
Removes part of the content.Modifier and TypeMethodDescriptionboolean
AbstractDocument.DefaultDocumentEvent.addEdit(UndoableEdit anEdit)
Adds a document edit. -
Uses of UndoableEdit in javax.swing.undo
Modifier and TypeClassDescriptionclass
An abstract implementation ofUndoableEdit
, implementing simple responses to all boolean methods in that interface.class
A concrete subclass of AbstractUndoableEdit, used to assemble little UndoableEdits into great big ones.class
StateEdit is a general edit for objects that change state.class
UndoManager
manages a list ofUndoableEdits
, providing a way to undo or redo the appropriate edits.Modifier and TypeFieldDescriptionprotected Vector<UndoableEdit>
CompoundEdit.edits
The collection ofUndoableEdit
s undone/redone en masse by thisCompoundEdit
.Modifier and TypeMethodDescriptionprotected UndoableEdit
UndoManager.editToBeRedone()
Returns the next significant edit to be redone ifredo
is invoked.protected UndoableEdit
UndoManager.editToBeUndone()
Returns the next significant edit to be undone ifundo
is invoked.protected UndoableEdit
CompoundEdit.lastEdit()
Returns the lastUndoableEdit
inedits
, ornull
ifedits
is empty.Modifier and TypeMethodDescriptionprotected void
UndoableEditSupport._postEdit(UndoableEdit e)
Called only frompostEdit
andendUpdate
.boolean
AbstractUndoableEdit.addEdit(UndoableEdit anEdit)
This default implementation returns false.boolean
CompoundEdit.addEdit(UndoableEdit anEdit)
If this edit isinProgress
, acceptsanEdit
and returns true.boolean
UndoableEdit.addEdit(UndoableEdit anEdit)
Adds anUndoableEdit
to thisUndoableEdit
.boolean
UndoManager.addEdit(UndoableEdit anEdit)
Adds anUndoableEdit
to thisUndoManager
, if it's possible.void
UndoableEditSupport.postEdit(UndoableEdit e)
DEADLOCK WARNING: Calling this method may callundoableEditHappened
in all listeners.protected void
UndoManager.redoTo(UndoableEdit edit)
Redoes all changes from the index of the next edit toedit
, 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 thisUndoableEdit
should replaceanEdit
.protected void
UndoManager.undoTo(UndoableEdit edit)
Undoes all changes from the index of the next edit toedit
, updating the index of the next edit appropriately.