Package org.openl.rules.table.actions
Class UndoableInsertColumnsAction
- java.lang.Object
-
- org.openl.rules.table.actions.UndoableEditTableAction
-
- org.openl.rules.table.actions.UndoableInsertAction
-
- org.openl.rules.table.actions.UndoableInsertColumnsAction
-
- All Implemented Interfaces:
IUndoableAction,IUndoableGridTableAction
public class UndoableInsertColumnsAction extends UndoableInsertAction
- Author:
- Andrei Astrouski
-
-
Field Summary
-
Fields inherited from class org.openl.rules.table.actions.UndoableInsertAction
metaInfoWriter
-
Fields inherited from class org.openl.rules.table.actions.UndoableEditTableAction
COLUMNS, INSERT, REMOVE, ROWS
-
-
Constructor Summary
Constructors Constructor Description UndoableInsertColumnsAction(int nCols, int beforeCol, int row, MetaInfoWriter metaInfoWriter)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleancanInsertColumns(IGridTable table, int nCols)protected booleancanPerformAction(IGridTable table)Checks if action can be performed without moving the table.protected GridRegionActiongetGridRegionAction(IGridRegion gridRegion, int numberToInsert)protected intgetNumberToInsert(IGridTable table)Get actual number of rows or columns to be inserted.protected IUndoableGridTableActionperformAction(int numberToInsert, IGridRegion fullTableRegion, IGridTable table)Perform action for inserting rows or columns.-
Methods inherited from class org.openl.rules.table.actions.UndoableInsertAction
doAction, undoAction
-
Methods inherited from class org.openl.rules.table.actions.UndoableEditTableAction
getOriginalRegion, getOriginalTable, isDecoratorTable, moveTable
-
-
-
-
Constructor Detail
-
UndoableInsertColumnsAction
public UndoableInsertColumnsAction(int nCols, int beforeCol, int row, MetaInfoWriter metaInfoWriter)
-
-
Method Detail
-
canInsertColumns
public static boolean canInsertColumns(IGridTable table, int nCols)
-
canPerformAction
protected boolean canPerformAction(IGridTable table)
Description copied from class:UndoableInsertActionChecks if action can be performed without moving the table.- Specified by:
canPerformActionin classUndoableInsertAction- Parameters:
table- a table to apply the action.- Returns:
- true if action can be performed without moving the table.
-
getNumberToInsert
protected int getNumberToInsert(IGridTable table)
Description copied from class:UndoableInsertActionGet actual number of rows or columns to be inserted. It depends whether the cell is merged or not.- Specified by:
getNumberToInsertin classUndoableInsertAction- Parameters:
table- a table to apply the action.- Returns:
- actual number to be inserted.
-
performAction
protected IUndoableGridTableAction performAction(int numberToInsert, IGridRegion fullTableRegion, IGridTable table)
Description copied from class:UndoableInsertActionPerform action for inserting rows or columns.- Specified by:
performActionin classUndoableInsertAction- Parameters:
numberToInsert- number of rows or columns to be inserted.fullTableRegion- a region of original tabletable- a table to apply the action.- Returns:
- action for inserting rows or columns.
-
getGridRegionAction
protected GridRegionAction getGridRegionAction(IGridRegion gridRegion, int numberToInsert)
- Specified by:
getGridRegionActionin classUndoableInsertAction
-
-