Package com.tagtraum.core.swing
Class ObservableUndoManager
- java.lang.Object
-
- javax.swing.undo.AbstractUndoableEdit
-
- javax.swing.undo.CompoundEdit
-
- javax.swing.undo.UndoManager
-
- com.tagtraum.core.swing.ObservableUndoManager
-
- All Implemented Interfaces:
Serializable
,EventListener
,UndoableEditListener
,UndoableEdit
public class ObservableUndoManager extends UndoManager
ObservableUndoManager
with support for property notification ("canRedo" and "canUndo").- Author:
- Hendrik Schreiber
- See Also:
- 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
Constructors Constructor Description ObservableUndoManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addEdit(UndoableEdit anEdit)
void
addPropertyChangeListener(PropertyChangeListener listener)
PropertyChangeListener[]
getPropertyChangeListeners()
void
redo()
void
removePropertyChangeListener(PropertyChangeListener listener)
void
undo()
-
Methods inherited from class javax.swing.undo.UndoManager
canRedo, canUndo, canUndoOrRedo, discardAllEdits, editToBeRedone, editToBeUndone, end, getLimit, getRedoPresentationName, getUndoOrRedoPresentationName, getUndoPresentationName, redoTo, setLimit, toString, trimEdits, trimForLimit, undoableEditHappened, undoOrRedo, undoTo
-
Methods inherited from class javax.swing.undo.CompoundEdit
die, getPresentationName, isInProgress, isSignificant, lastEdit
-
Methods inherited from class javax.swing.undo.AbstractUndoableEdit
replaceEdit
-
-
-
-
Method Detail
-
addEdit
public boolean addEdit(UndoableEdit anEdit)
- Specified by:
addEdit
in interfaceUndoableEdit
- Overrides:
addEdit
in classUndoManager
-
undo
public void undo() throws CannotUndoException
- Specified by:
undo
in interfaceUndoableEdit
- Overrides:
undo
in classUndoManager
- Throws:
CannotUndoException
-
redo
public void redo() throws CannotRedoException
- Specified by:
redo
in interfaceUndoableEdit
- Overrides:
redo
in classUndoManager
- Throws:
CannotRedoException
-
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
-
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
-
getPropertyChangeListeners
public PropertyChangeListener[] getPropertyChangeListeners()
-
-