
Retur ned By: javax.swing .event.UndoableEditEvent.getEdit(),
javax.swing .text.AbstractDocument.Content.{insertString(), remove()},
javax.swing .text.GapContent.{insertString(), remove()}, javax.swing .text.StringContent.{insertString(), remove()},
CompoundEdit.lastEdit(), UndoManager.{editToBeRedone(), editToBeUndone()}
UndoableEditSuppor t Ja va 1.2
javax.swing .undo
This utility class is useful for classes that support undoable edits and send
javax.swing .event.UndoableEditEvent events to javax.swing .event.UndoableEditListener objects. An
object that generates undoable events must allow the registration and deregistration of
event listeners for those events. Such an object can simply create an UndoableEditSuppor t
object and delegate to its addUndoableEditListener() and removeUndoableEditListener() meth-
ods.
UndoableEditSuppor t nor mally sends an UndoableEditEvent to all register ed listeners when
the postEdit() method is invoked. It also allows batching of edits into a CompoundEdit,
however. If beginUpdate() is called, all UndoableEdit objects passed to postEdit() ar e batched
into a CompoundEdit until endUpdate() is called. In this case, the UndoableEditEvent that con-
tains the CompoundEdit is not sent to the register ed UndoableEditListener objects until endUp-
date() is invoked. If beginUpdate() is called more than once, endUpdate() must be called a
matching number of times.
public ...