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 TypeMethodDescriptionvoidaddUndoableEditListener(UndoableEditListener listener) Adds an undoable edit listener.booleancanRedo()booleancanUndo()Gets the array of all undoable edit listeners.voidpostEdit(UndoableEdit edit) Posts an undoable edit.voidredo()voidRemoves an undoable edit listener.voidundo()
-
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
-