Class UndoableInsertAction

    • Constructor Detail

      • UndoableInsertAction

        protected UndoableInsertAction​(MetaInfoWriter metaInfoWriter)
    • Method Detail

      • doAction

        public void doAction​(IGridTable table)
      • undoAction

        public void undoAction​(IGridTable table)
      • canPerformAction

        protected abstract boolean canPerformAction​(IGridTable table)
        Checks if action can be performed without moving the table.
        Parameters:
        table - a table to apply the action.
        Returns:
        true if action can be performed without moving the table.
      • getNumberToInsert

        protected abstract int getNumberToInsert​(IGridTable table)
        Get actual number of rows or columns to be inserted. It depends whether the cell is merged or not.
        Parameters:
        table - a table to apply the action.
        Returns:
        actual number to be inserted.
      • performAction

        protected abstract IUndoableGridTableAction performAction​(int numberToInsert,
                                                                  IGridRegion fullTableRegion,
                                                                  IGridTable table)
        Perform action for inserting rows or columns.
        Parameters:
        numberToInsert - number of rows or columns to be inserted.
        fullTableRegion - a region of original table
        table - a table to apply the action.
        Returns:
        action for inserting rows or columns.