|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.undo.AbstractUndoableEdit
javax.swing.undo.CompoundEdit
javax.swing.undo.UndoManager
com.pietschy.command.undo.UndoContext
public class UndoContext
Provides a drop-in replacement for swings UndoManager that provides state change
notifications to listners like the UndoCommand and RedoCommand.
The undo and redo commands locate the current undo context via their
CommandContainer. See CommandContainer.setUndoContext(UndoContext).
CommandContainer.setUndoContext(UndoContext),
UndoCommand,
RedoCommand,
Serialized Form| Field Summary |
|---|
| Fields inherited from class javax.swing.undo.CompoundEdit |
|---|
edits |
| Fields inherited from class javax.swing.undo.AbstractUndoableEdit |
|---|
RedoName, UndoName |
| Constructor Summary | |
|---|---|
UndoContext()
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
addChangeListener(javax.swing.event.ChangeListener l)
Adds a the specified listener. |
boolean |
addEdit(javax.swing.undo.UndoableEdit anEdit)
Overrides UndoManager.addEdit(UndoableEdit) to provide state change notification. |
protected void |
fireStateChaged()
Notifies listeners that there has been a change in state. |
void |
redo()
Overrides UndoManager.redo() to provide state change notification. |
void |
removeChangeListener(javax.swing.event.ChangeListener l)
Removes the specified listener. |
void |
undo()
Overrides UndoManager.undo() to provide state change notification. |
void |
undoableEditHappened(javax.swing.event.UndoableEditEvent e)
Overrides UndoManager.undoableEditHappened(UndoableEditEvent) to provide state change notification. |
| Methods inherited from class javax.swing.undo.UndoManager |
|---|
canRedo, canUndo, canUndoOrRedo, discardAllEdits, editToBeRedone, editToBeUndone, end, getLimit, getRedoPresentationName, getUndoOrRedoPresentationName, getUndoPresentationName, redoTo, setLimit, toString, trimEdits, trimForLimit, undoOrRedo, undoTo |
| Methods inherited from class javax.swing.undo.CompoundEdit |
|---|
die, getPresentationName, isInProgress, isSignificant, lastEdit |
| Methods inherited from class javax.swing.undo.AbstractUndoableEdit |
|---|
replaceEdit |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public UndoContext()
| Method Detail |
|---|
public boolean addEdit(javax.swing.undo.UndoableEdit anEdit)
UndoManager.addEdit(UndoableEdit) to provide state change notification.
addEdit in interface javax.swing.undo.UndoableEditaddEdit in class javax.swing.undo.UndoManagerpublic void undoableEditHappened(javax.swing.event.UndoableEditEvent e)
UndoManager.undoableEditHappened(UndoableEditEvent) to provide state change notification.
undoableEditHappened in interface javax.swing.event.UndoableEditListenerundoableEditHappened in class javax.swing.undo.UndoManagerpublic void undo()
UndoManager.undo() to provide state change notification.
undo in interface javax.swing.undo.UndoableEditundo in class javax.swing.undo.UndoManagerpublic void redo()
UndoManager.redo() to provide state change notification.
redo in interface javax.swing.undo.UndoableEditredo in class javax.swing.undo.UndoManagerprotected void fireStateChaged()
public void addChangeListener(javax.swing.event.ChangeListener l)
l - the listener to add.public void removeChangeListener(javax.swing.event.ChangeListener l)
l - the listener to remove.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||