Package io.keikai.ui.impl.undo
Class Abstract2DCellDataStyleAction
java.lang.Object
io.keikai.ui.impl.undo.AbstractUndoableAction
io.keikai.ui.impl.undo.Abstract2DCellDataStyleAction
- All Implemented Interfaces:
UndoableAction,Serializable
- Direct Known Subclasses:
AutoFillCellAction,CutCellAction,ShiftCellAction
abstract class handle src and destination content/style reservation
- Author:
- dennis
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intprotected final intprotected final intprotected final intprotected final Sheetprotected final booleanprotected final booleanstatic final intstatic final intstatic final intstatic final intFields inherited from class io.keikai.ui.impl.undo.AbstractUndoableAction
_column, _label, _lastColumn, _lastRow, _row, _sheet, _wholeColumn, _wholeRow -
Constructor Summary
ConstructorsConstructorDescriptionAbstract2DCellDataStyleAction(String label, Sheet sheet, int srcRow, int srcColumn, int srcLastRow, int srcLastColumn, boolean srcWholeColumn, boolean srcWholeRow, Sheet destSheet, int destRow, int destColumn, int destLastRow, int destLastColumn, boolean destWholeColumn, boolean destWholeRow, int reserveType) Abstract2DCellDataStyleAction(String label, Sheet sheet, int srcRow, int srcColumn, int srcLastRow, int srcLastColumn, Sheet destSheet, int destRow, int destColumn, int destLastRow, int destLastColumn, int reserveType) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoiddoAction()do the action, either first time or redoprotected intprotected intprotected intprotected intprotected Sheetprotected intprotected intprotected intprotected intprotected Sheetprotected booleanbooleanCheck if still redoable or notprotected booleanCheck if sheet is protectedprotected booleanbooleanCheck if still undoable or notvoidUndo the actionMethods inherited from class io.keikai.ui.impl.undo.AbstractUndoableAction
getLabel, getUndoSelection, isAnyCellProtected, isSheetAvailable, toString
-
Field Details
-
RESERVE_CONTENT
public static final int RESERVE_CONTENT- See Also:
-
RESERVE_STYLE
public static final int RESERVE_STYLE- See Also:
-
RESERVE_MERGE
public static final int RESERVE_MERGE- See Also:
-
RESERVE_ALL
public static final int RESERVE_ALL- See Also:
-
_destSheet
-
_destRow
protected final int _destRow -
_destColumn
protected final int _destColumn -
_destLastRow
protected final int _destLastRow -
_destLastColumn
protected final int _destLastColumn -
_destWholeColumn
protected final boolean _destWholeColumn -
_destWholeRow
protected final boolean _destWholeRow
-
-
Constructor Details
-
Abstract2DCellDataStyleAction
public Abstract2DCellDataStyleAction(String label, Sheet sheet, int srcRow, int srcColumn, int srcLastRow, int srcLastColumn, boolean srcWholeColumn, boolean srcWholeRow, Sheet destSheet, int destRow, int destColumn, int destLastRow, int destLastColumn, boolean destWholeColumn, boolean destWholeRow, int reserveType) -
Abstract2DCellDataStyleAction
-
-
Method Details
-
isSheetProtected
protected boolean isSheetProtected()Description copied from class:AbstractUndoableActionCheck if sheet is protected- Overrides:
isSheetProtectedin classAbstractUndoableAction- Returns:
-
isSrcSheetProtected
protected boolean isSrcSheetProtected() -
isDstSheetProtected
protected boolean isDstSheetProtected() -
getUndoSheet
- Specified by:
getUndoSheetin interfaceUndoableAction- Overrides:
getUndoSheetin classAbstractUndoableAction- Returns:
- target sheet of undo action, null if doesn't provided
-
getRedoSheet
- Specified by:
getRedoSheetin interfaceUndoableAction- Overrides:
getRedoSheetin classAbstractUndoableAction- Returns:
- target sheet of redo action, null if doesn't provided
-
getReservedSrcRow
protected int getReservedSrcRow() -
getReservedSrcColumn
protected int getReservedSrcColumn() -
getReservedSrcLastRow
protected int getReservedSrcLastRow() -
getReservedSrcLastColumn
protected int getReservedSrcLastColumn() -
getReservedSrcSheet
-
getReservedDestRow
protected int getReservedDestRow() -
getReservedDestColumn
protected int getReservedDestColumn() -
getReservedDestLastRow
protected int getReservedDestLastRow() -
getReservedDestLastColumn
protected int getReservedDestLastColumn() -
getReservedDestSheet
-
doAction
public void doAction()Description copied from interface:UndoableActiondo the action, either first time or redo -
applyAction
protected void applyAction() -
isUndoable
public boolean isUndoable()Description copied from interface:UndoableActionCheck if still undoable or not- Returns:
-
isRedoable
public boolean isRedoable()Description copied from interface:UndoableActionCheck if still redoable or not- Returns:
-
undoAction
public void undoAction()Description copied from interface:UndoableActionUndo the action -
getRedoSelection
- Specified by:
getRedoSelectionin interfaceUndoableAction- Overrides:
getRedoSelectionin classAbstractUndoableAction- Returns:
- Selection after redo of this action, null if doesn't provided;
-