Package com.bc.ceres.swing.undo.support
Class DefaultUndoContext
java.lang.Object
com.bc.ceres.swing.undo.support.DefaultUndoContext
- All Implemented Interfaces:
UndoContext
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultUndoContext(Object source) DefaultUndoContext(Object source, UndoManager undoManager) -
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()
-
Constructor Details
-
DefaultUndoContext
-
DefaultUndoContext
-
-
Method Details
-
getUndoManager
-
canUndo
public boolean canUndo()- Specified by:
canUndoin interfaceUndoContext
-
undo
public void undo()- Specified by:
undoin interfaceUndoContext
-
canRedo
public boolean canRedo()- Specified by:
canRedoin interfaceUndoContext
-
redo
public void redo()- Specified by:
redoin interfaceUndoContext
-
postEdit
Description copied from interface:UndoContextPosts an undoable edit. Listeners will be notified.- Specified by:
postEditin interfaceUndoContext- Parameters:
edit- The undoable edit.
-
addUndoableEditListener
Description copied from interface:UndoContextAdds an undoable edit listener.- Specified by:
addUndoableEditListenerin interfaceUndoContext- Parameters:
listener- The listener.
-
removeUndoableEditListener
Description copied from interface:UndoContextRemoves an undoable edit listener.- Specified by:
removeUndoableEditListenerin interfaceUndoContext- Parameters:
listener- The listener.
-
getUndoableEditListeners
Description copied from interface:UndoContextGets the array of all undoable edit listeners.- Specified by:
getUndoableEditListenersin interfaceUndoContext- Returns:
- The array of listeners or an empty array if no listeners have been added
-