Package org.openl.rules.table.actions
Class UndoableRemoveAction
- java.lang.Object
-
- org.openl.rules.table.actions.UndoableEditTableAction
-
- org.openl.rules.table.actions.UndoableRemoveAction
-
- All Implemented Interfaces:
IUndoableAction,IUndoableGridTableAction
- Direct Known Subclasses:
UndoableRemoveColumnsAction,UndoableRemoveRowsAction
public abstract class UndoableRemoveAction extends UndoableEditTableAction
Default behaviour for remove action.- Author:
- DLiauchuk
-
-
Field Summary
-
Fields inherited from class org.openl.rules.table.actions.UndoableEditTableAction
COLUMNS, INSERT, REMOVE, ROWS
-
-
Constructor Summary
Constructors Constructor Description UndoableRemoveAction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract booleancanPerformAction(IGridRegion gridRegion)Checks if action can be performed.voiddoAction(IGridTable table)protected abstract GridRegionActiongetGridRegionAction(IGridRegion gridRegion, int numberToRemove)protected abstract intgetNumberToRemove(IGridTable table)Get actual number of rows or columns to be removed.protected abstract IUndoableGridTableActionperformAction(int numberToRemove, IGridRegion fullTableRegion, IGridTable table)Perform action for removing rows or columns.voidundoAction(IGridTable table)-
Methods inherited from class org.openl.rules.table.actions.UndoableEditTableAction
getOriginalRegion, getOriginalTable, isDecoratorTable, moveTable
-
-
-
-
Method Detail
-
doAction
public void doAction(IGridTable table)
-
undoAction
public void undoAction(IGridTable table)
-
canPerformAction
protected abstract boolean canPerformAction(IGridRegion gridRegion)
Checks if action can be performed.- Parameters:
gridRegion-- Returns:
- true if action can be performed.
-
getNumberToRemove
protected abstract int getNumberToRemove(IGridTable table)
Get actual number of rows or columns to be removed. It depends whether the cell is merged or not.- Parameters:
table-- Returns:
- actual number to be removed.
-
performAction
protected abstract IUndoableGridTableAction performAction(int numberToRemove, IGridRegion fullTableRegion, IGridTable table)
Perform action for removing rows or columns.- Parameters:
numberToRemove-fullTableRegion-table-- Returns:
- action for removing rows or columns.
-
getGridRegionAction
protected abstract GridRegionAction getGridRegionAction(IGridRegion gridRegion, int numberToRemove)
-
-