Package com.bc.ceres.swing.undo
Interface UndoContext
-
- All Known Implementing Classes:
DefaultUndoContext
public interface UndoContextA context providing basic undo/redo functionality.- Since:
- Ceres 0.10
- See Also:
UndoManager,UndoableEditSupport
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddUndoableEditListener(UndoableEditListener listener)Adds an undoable edit listener.booleancanRedo()booleancanUndo()UndoableEditListener[]getUndoableEditListeners()Gets the array of all undoable edit listeners.voidpostEdit(UndoableEdit edit)Posts an undoable edit.voidredo()voidremoveUndoableEditListener(UndoableEditListener listener)Removes an undoable edit listener.voidundo()
-
-
-
Method Detail
-
canUndo
boolean canUndo()
-
undo
void undo()
-
canRedo
boolean canRedo()
-
redo
void redo()
-
postEdit
void postEdit(UndoableEdit edit)
Posts an undoable edit. Listeners will be notified.- Parameters:
edit- The undoable edit.
-
addUndoableEditListener
void addUndoableEditListener(UndoableEditListener listener)
Adds an undoable edit listener.- Parameters:
listener- The listener.
-
removeUndoableEditListener
void removeUndoableEditListener(UndoableEditListener listener)
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
-
-