Package io.keikai.ui.impl.undo
Class AbstractUndoableAction
- java.lang.Object
-
- io.keikai.ui.impl.undo.AbstractUndoableAction
-
- All Implemented Interfaces:
UndoableAction
,Serializable
- Direct Known Subclasses:
Abstract2DCellDataStyleAction
,AbstractCellDataStyleAction
,AbstractEditTextAction
,CellCommentAction
,DataValidationAction
,DeleteCellAction
,HideHeaderAction
,InsertCellAction
,ResizeHeaderAction
public abstract class AbstractUndoableAction extends Object implements UndoableAction, Serializable
- Author:
- dennis
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int
_column
protected String
_label
protected int
_lastColumn
protected int
_lastRow
protected int
_row
protected Sheet
_sheet
protected boolean
_wholeColumn
protected boolean
_wholeRow
-
Constructor Summary
Constructors Constructor Description AbstractUndoableAction(String label, Sheet sheet, int row, int column, int lastRow, int lastColumn)
AbstractUndoableAction(String label, Sheet sheet, int row, int column, int lastRow, int lastColumn, boolean wholeColumn, boolean wholeRow)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getLabel()
AreaRef
getRedoSelection()
Sheet
getRedoSheet()
AreaRef
getUndoSelection()
Sheet
getUndoSheet()
protected boolean
isAnyCellProtected(Sheet sheet, CellRegion cellRegion)
protected boolean
isSheetAvailable()
Check if sheet still availableprotected boolean
isSheetProtected()
Check if sheet is protectedString
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.keikai.ui.sys.UndoableAction
doAction, isRedoable, isUndoable, undoAction
-
-
-
-
Field Detail
-
_label
protected final String _label
-
_sheet
protected final Sheet _sheet
-
_row
protected final int _row
-
_column
protected final int _column
-
_lastRow
protected final int _lastRow
-
_lastColumn
protected final int _lastColumn
-
_wholeColumn
protected final boolean _wholeColumn
-
_wholeRow
protected final boolean _wholeRow
-
-
Method Detail
-
getLabel
public String getLabel()
- Specified by:
getLabel
in interfaceUndoableAction
- Returns:
- the label of this action
-
isSheetAvailable
protected boolean isSheetAvailable()
Check if sheet still available- Returns:
-
isSheetProtected
protected boolean isSheetProtected()
Check if sheet is protected- Returns:
-
isAnyCellProtected
protected boolean isAnyCellProtected(Sheet sheet, CellRegion cellRegion)
-
getUndoSelection
public AreaRef getUndoSelection()
- Specified by:
getUndoSelection
in interfaceUndoableAction
- Returns:
- Selection after undo of this action, null if doesn't provided;
-
getRedoSelection
public AreaRef getRedoSelection()
- Specified by:
getRedoSelection
in interfaceUndoableAction
- Returns:
- Selection after redo of this action, null if doesn't provided;
-
getUndoSheet
public Sheet getUndoSheet()
- Specified by:
getUndoSheet
in interfaceUndoableAction
- Returns:
- target sheet of undo action, null if doesn't provided
-
getRedoSheet
public Sheet getRedoSheet()
- Specified by:
getRedoSheet
in interfaceUndoableAction
- Returns:
- target sheet of redo action, null if doesn't provided
-
-