Package com.bc.ceres.swing.undo
Interface UndoContext
- All Known Implementing Classes:
DefaultUndoContext
public interface UndoContext
A context providing basic undo/redo functionality.
- Since:
- Ceres 0.10
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addUndoableEditListener
(UndoableEditListener listener) Adds an undoable edit listener.boolean
canRedo()
boolean
canUndo()
Gets the array of all undoable edit listeners.void
postEdit
(UndoableEdit edit) Posts an undoable edit.void
redo()
void
Removes an undoable edit listener.void
undo()
-
Method Details
-
canUndo
boolean canUndo() -
undo
void undo() -
canRedo
boolean canRedo() -
redo
void redo() -
postEdit
Posts an undoable edit. Listeners will be notified.- Parameters:
edit
- The undoable edit.
-
addUndoableEditListener
Adds an undoable edit listener.- Parameters:
listener
- The listener.
-
removeUndoableEditListener
Removes an undoable edit listener.- Parameters:
listener
- The listener.
-
getUndoableEditListeners
UndoableEditListener[] getUndoableEditListeners()Gets the array of all undoable edit listeners.- Returns:
- The array of listeners or an empty array if no listeners have been added
-