Package org.openl.rules.table.actions
Class UndoableRemoveRowsAction
- java.lang.Object
-
- org.openl.rules.table.actions.UndoableEditTableAction
-
- org.openl.rules.table.actions.UndoableRemoveAction
-
- org.openl.rules.table.actions.UndoableRemoveRowsAction
-
- All Implemented Interfaces:
IUndoableAction,IUndoableGridTableAction
public class UndoableRemoveRowsAction extends UndoableRemoveAction
- Author:
- Andrei Astrouski
-
-
Field Summary
-
Fields inherited from class org.openl.rules.table.actions.UndoableEditTableAction
COLUMNS, INSERT, REMOVE, ROWS
-
-
Constructor Summary
Constructors Constructor Description UndoableRemoveRowsAction(int nRows, int startRow, int col, MetaInfoWriter metaInfoWriter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanPerformAction(IGridRegion gridRegion)Checks if action can be performed.protected GridRegionActiongetGridRegionAction(IGridRegion gridRegion, int numberToRemove)protected intgetNumberToRemove(IGridTable table)Get actual number of rows or columns to be removed.protected IUndoableGridTableActionperformAction(int numberToRemove, IGridRegion fullTableRegion, IGridTable table)Perform action for removing rows or columns.-
Methods inherited from class org.openl.rules.table.actions.UndoableRemoveAction
doAction, undoAction
-
Methods inherited from class org.openl.rules.table.actions.UndoableEditTableAction
getOriginalRegion, getOriginalTable, isDecoratorTable, moveTable
-
-
-
-
Constructor Detail
-
UndoableRemoveRowsAction
public UndoableRemoveRowsAction(int nRows, int startRow, int col, MetaInfoWriter metaInfoWriter)
-
-
Method Detail
-
canPerformAction
protected boolean canPerformAction(IGridRegion gridRegion)
Description copied from class:UndoableRemoveActionChecks if action can be performed.- Specified by:
canPerformActionin classUndoableRemoveAction- Returns:
- true if action can be performed.
-
getGridRegionAction
protected GridRegionAction getGridRegionAction(IGridRegion gridRegion, int numberToRemove)
- Specified by:
getGridRegionActionin classUndoableRemoveAction
-
getNumberToRemove
protected int getNumberToRemove(IGridTable table)
Description copied from class:UndoableRemoveActionGet actual number of rows or columns to be removed. It depends whether the cell is merged or not.- Specified by:
getNumberToRemovein classUndoableRemoveAction- Returns:
- actual number to be removed.
-
performAction
protected IUndoableGridTableAction performAction(int numberToRemove, IGridRegion fullTableRegion, IGridTable table)
Description copied from class:UndoableRemoveActionPerform action for removing rows or columns.- Specified by:
performActionin classUndoableRemoveAction- Returns:
- action for removing rows or columns.
-
-