Package io.keikai.ui.sys
Interface UndoableActionManager
- All Known Implementing Classes:
DummyUndoableActionManager,UndoableActionManagerImpl
public interface UndoableActionManager
the manager to control undoable action
- Author:
- dennis
-
Method Summary
Modifier and TypeMethodDescriptionvoidbind(Spreadsheet spreadsheet) Will be called when a manager createvoidclear()clear the historyvoiddoAction(UndoableAction action) Do the action and put it into historyGet redo label, only available ifisRedoable()Get undo label, only available ifisUndoable()booleanIs redoablebooleanIs undoablevoidredo the last undo action, only availabel ifisRedoable()voidsetMaxHsitorySize(int size) Sets the maximun history sizevoidundo last action, only available ifisUndoable()
-
Method Details
-
doAction
Do the action and put it into history- Parameters:
action-
-
isUndoable
boolean isUndoable()Is undoable- Returns:
-
getUndoLabel
String getUndoLabel()Get undo label, only available ifisUndoable()- Returns:
-
undoAction
void undoAction()undo last action, only available ifisUndoable() -
isRedoable
boolean isRedoable()Is redoable- Returns:
-
getRedoLabel
String getRedoLabel()Get redo label, only available ifisRedoable()- Returns:
-
redoAction
void redoAction()redo the last undo action, only availabel ifisRedoable() -
clear
void clear()clear the history -
setMaxHsitorySize
void setMaxHsitorySize(int size) Sets the maximun history size- Parameters:
size-
-
bind
Will be called when a manager create- Parameters:
sparedsheet-
-