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
_destColumn
protected int
_destLastColumn
protected int
_destLastRow
protected int
_destRow
protected Sheet
_destSheet
protected boolean
_destWholeColumn
protected boolean
_destWholeRow
static int
RESERVE_ALL
static int
RESERVE_CONTENT
static int
RESERVE_MERGE
static int
RESERVE_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 void
applyAction()
void
doAction()
do the action, either first time or redoAreaRef
getRedoSelection()
Sheet
getRedoSheet()
protected int
getReservedDestColumn()
protected int
getReservedDestLastColumn()
protected int
getReservedDestLastRow()
protected int
getReservedDestRow()
protected Sheet
getReservedDestSheet()
protected int
getReservedSrcColumn()
protected int
getReservedSrcLastColumn()
protected int
getReservedSrcLastRow()
protected int
getReservedSrcRow()
protected Sheet
getReservedSrcSheet()
Sheet
getUndoSheet()
protected boolean
isDstSheetProtected()
boolean
isRedoable()
Check if still redoable or notprotected boolean
isSheetProtected()
Check if sheet is protectedprotected boolean
isSrcSheetProtected()
boolean
isUndoable()
Check if still undoable or notvoid
undoAction()
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:AbstractUndoableAction
Check if sheet is protected- Overrides:
isSheetProtected
in classAbstractUndoableAction
- Returns:
-
isSrcSheetProtected
protected boolean isSrcSheetProtected()
-
isDstSheetProtected
protected boolean isDstSheetProtected()
-
getUndoSheet
public Sheet getUndoSheet()
- Specified by:
getUndoSheet
in interfaceUndoableAction
- Overrides:
getUndoSheet
in classAbstractUndoableAction
- Returns:
- target sheet of undo action, null if doesn't provided
-
getRedoSheet
public Sheet getRedoSheet()
- Specified by:
getRedoSheet
in interfaceUndoableAction
- Overrides:
getRedoSheet
in 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:UndoableAction
do the action, either first time or redo
-
applyAction
protected void applyAction()
-
isUndoable
public boolean isUndoable()
Description copied from interface:UndoableAction
Check if still undoable or not- Returns:
-
isRedoable
public boolean isRedoable()
Description copied from interface:UndoableAction
Check if still redoable or not- Returns:
-
undoAction
public void undoAction()
Description copied from interface:UndoableAction
Undo the action
-
getRedoSelection
public AreaRef getRedoSelection()
- Specified by:
getRedoSelection
in interfaceUndoableAction
- Overrides:
getRedoSelection
in classAbstractUndoableAction
- Returns:
- Selection after redo of this action, null if doesn't provided;
-
-