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_columnprotected String_labelprotected int_lastColumnprotected int_lastRowprotected int_rowprotected Sheet_sheetprotected boolean_wholeColumnprotected 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 StringgetLabel()AreaRefgetRedoSelection()SheetgetRedoSheet()AreaRefgetUndoSelection()SheetgetUndoSheet()protected booleanisAnyCellProtected(Sheet sheet, CellRegion cellRegion)protected booleanisSheetAvailable()Check if sheet still availableprotected booleanisSheetProtected()Check if sheet is protectedStringtoString()-
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:
getLabelin 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:
getUndoSelectionin interfaceUndoableAction- Returns:
- Selection after undo of this action, null if doesn't provided;
-
getRedoSelection
public AreaRef getRedoSelection()
- Specified by:
getRedoSelectionin interfaceUndoableAction- Returns:
- Selection after redo of this action, null if doesn't provided;
-
getUndoSheet
public Sheet getUndoSheet()
- Specified by:
getUndoSheetin interfaceUndoableAction- Returns:
- target sheet of undo action, null if doesn't provided
-
getRedoSheet
public Sheet getRedoSheet()
- Specified by:
getRedoSheetin interfaceUndoableAction- Returns:
- target sheet of redo action, null if doesn't provided
-
-