Package io.keikaiex.ui.impl
Class UndoableActionManagerImpl
- java.lang.Object
-
- io.keikaiex.ui.impl.UndoableActionManagerImpl
-
- All Implemented Interfaces:
UndoableActionManager
,Serializable
public class UndoableActionManagerImpl extends Object implements UndoableActionManager, Serializable
default undoable action manager- Author:
- dennis
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UndoableActionManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bind(Spreadsheet spreadsheet)
Will be called when a manager createvoid
clear()
clear the historyvoid
doAction(UndoableAction action)
Do the action and put it into historyString
getRedoLabel()
Get redo label, only available ifUndoableActionManager.isRedoable()
String
getUndoLabel()
Get undo label, only available ifUndoableActionManager.isUndoable()
boolean
isRedoable()
Is redoableboolean
isUndoable()
Is undoablevoid
redoAction()
redo the last undo action, only availabel ifUndoableActionManager.isRedoable()
void
setMaxHsitorySize(int size)
Sets the maximun history sizevoid
undoAction()
undo last action, only available ifUndoableActionManager.isUndoable()
-
-
-
Method Detail
-
doAction
public void doAction(UndoableAction action)
Description copied from interface:UndoableActionManager
Do the action and put it into history- Specified by:
doAction
in interfaceUndoableActionManager
-
isUndoable
public boolean isUndoable()
Description copied from interface:UndoableActionManager
Is undoable- Specified by:
isUndoable
in interfaceUndoableActionManager
- Returns:
-
getUndoLabel
public String getUndoLabel()
Description copied from interface:UndoableActionManager
Get undo label, only available ifUndoableActionManager.isUndoable()
- Specified by:
getUndoLabel
in interfaceUndoableActionManager
- Returns:
-
undoAction
public void undoAction()
Description copied from interface:UndoableActionManager
undo last action, only available ifUndoableActionManager.isUndoable()
- Specified by:
undoAction
in interfaceUndoableActionManager
-
isRedoable
public boolean isRedoable()
Description copied from interface:UndoableActionManager
Is redoable- Specified by:
isRedoable
in interfaceUndoableActionManager
- Returns:
-
getRedoLabel
public String getRedoLabel()
Description copied from interface:UndoableActionManager
Get redo label, only available ifUndoableActionManager.isRedoable()
- Specified by:
getRedoLabel
in interfaceUndoableActionManager
- Returns:
-
redoAction
public void redoAction()
Description copied from interface:UndoableActionManager
redo the last undo action, only availabel ifUndoableActionManager.isRedoable()
- Specified by:
redoAction
in interfaceUndoableActionManager
-
clear
public void clear()
Description copied from interface:UndoableActionManager
clear the history- Specified by:
clear
in interfaceUndoableActionManager
-
setMaxHsitorySize
public void setMaxHsitorySize(int size)
Description copied from interface:UndoableActionManager
Sets the maximun history size- Specified by:
setMaxHsitorySize
in interfaceUndoableActionManager
-
bind
public void bind(Spreadsheet spreadsheet)
Description copied from interface:UndoableActionManager
Will be called when a manager create- Specified by:
bind
in interfaceUndoableActionManager
-
-