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:
UndoManager
,UndoableEditSupport
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addUndoableEditListener(UndoableEditListener listener)
Adds an undoable edit listener.boolean
canRedo()
boolean
canUndo()
UndoableEditListener[]
getUndoableEditListeners()
Gets the array of all undoable edit listeners.void
postEdit(UndoableEdit edit)
Posts an undoable edit.void
redo()
void
removeUndoableEditListener(UndoableEditListener listener)
Removes an undoable edit listener.void
undo()
-
-
-
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
-
-