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
public abstract class Abstract2DCellDataStyleAction extends AbstractUndoableAction
abstract class handle src and destination content/style reservation- Author:
- dennis
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int_destColumnprotected int_destLastColumnprotected int_destLastRowprotected int_destRowprotected Sheet_destSheetprotected boolean_destWholeColumnprotected boolean_destWholeRowstatic intRESERVE_ALLstatic intRESERVE_CONTENTstatic intRESERVE_MERGEstatic intRESERVE_STYLE-
Fields inherited from class io.keikai.ui.impl.undo.AbstractUndoableAction
_column, _label, _lastColumn, _lastRow, _row, _sheet, _wholeColumn, _wholeRow
-
-
Constructor Summary
Constructors Constructor Description 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(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidapplyAction()voiddoAction()do the action, either first time or redoAreaRefgetRedoSelection()SheetgetRedoSheet()protected intgetReservedDestColumn()protected intgetReservedDestLastColumn()protected intgetReservedDestLastRow()protected intgetReservedDestRow()protected SheetgetReservedDestSheet()protected intgetReservedSrcColumn()protected intgetReservedSrcLastColumn()protected intgetReservedSrcLastRow()protected intgetReservedSrcRow()protected SheetgetReservedSrcSheet()SheetgetUndoSheet()protected booleanisDstSheetProtected()booleanisRedoable()Check if still redoable or notprotected booleanisSheetProtected()Check if sheet is protectedprotected booleanisSrcSheetProtected()booleanisUndoable()Check if still undoable or notvoidundoAction()Undo the action-
Methods inherited from class io.keikai.ui.impl.undo.AbstractUndoableAction
getLabel, getUndoSelection, isAnyCellProtected, isSheetAvailable, toString
-
-
-
-
Field Detail
-
RESERVE_CONTENT
public static final int RESERVE_CONTENT
- See Also:
- Constant Field Values
-
RESERVE_STYLE
public static final int RESERVE_STYLE
- See Also:
- Constant Field Values
-
RESERVE_MERGE
public static final int RESERVE_MERGE
- See Also:
- Constant Field Values
-
RESERVE_ALL
public static final int RESERVE_ALL
- See Also:
- Constant Field Values
-
_destSheet
protected final Sheet _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 Detail
-
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)
-
-
Method Detail
-
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
public Sheet getUndoSheet()
- Specified by:
getUndoSheetin interfaceUndoableAction- Overrides:
getUndoSheetin classAbstractUndoableAction- Returns:
- target sheet of undo action, null if doesn't provided
-
getRedoSheet
public Sheet 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
protected Sheet getReservedSrcSheet()
-
getReservedDestRow
protected int getReservedDestRow()
-
getReservedDestColumn
protected int getReservedDestColumn()
-
getReservedDestLastRow
protected int getReservedDestLastRow()
-
getReservedDestLastColumn
protected int getReservedDestLastColumn()
-
getReservedDestSheet
protected Sheet 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
public AreaRef getRedoSelection()
- Specified by:
getRedoSelectionin interfaceUndoableAction- Overrides:
getRedoSelectionin classAbstractUndoableAction- Returns:
- Selection after redo of this action, null if doesn't provided;
-
-