Class AbstractUndoableAction

java.lang.Object
io.keikai.ui.impl.undo.AbstractUndoableAction
All Implemented Interfaces:
UndoableAction, Serializable
Direct Known Subclasses:
Abstract2DCellDataStyleAction, AbstractCellDataStyleAction, AbstractEditTextAction, CellCommentAction, DataValidationAction, DeleteCellAction, HideHeaderAction, InsertCellAction, ResizeHeaderAction

public abstract class AbstractUndoableAction extends Object implements UndoableAction, Serializable
Author:
dennis
See Also:
  • Field Details

    • _label

      protected final String _label
    • _sheet

      protected final Sheet _sheet
    • _row

      protected final int _row
    • _column

      protected final int _column
    • _lastRow

      protected final int _lastRow
    • _lastColumn

      protected final int _lastColumn
    • _wholeColumn

      protected final boolean _wholeColumn
    • _wholeRow

      protected final boolean _wholeRow
  • Constructor Details

    • AbstractUndoableAction

      public AbstractUndoableAction(String label, Sheet sheet, int row, int column, int lastRow, int lastColumn, boolean wholeColumn, boolean wholeRow)
    • AbstractUndoableAction

      public AbstractUndoableAction(String label, Sheet sheet, int row, int column, int lastRow, int lastColumn)
  • Method Details

    • getLabel

      public String getLabel()
      Specified by:
      getLabel in interface UndoableAction
      Returns:
      the label of this action
    • isSheetAvailable

      protected boolean isSheetAvailable()
      Check if sheet still available
      Returns:
    • isSheetProtected

      protected boolean isSheetProtected()
      Check if sheet is protected
      Returns:
    • isAnyCellProtected

      protected boolean isAnyCellProtected(Sheet sheet, CellRegion cellRegion)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getUndoSelection

      public AreaRef getUndoSelection()
      Specified by:
      getUndoSelection in interface UndoableAction
      Returns:
      Selection after undo of this action, null if doesn't provided;
    • getRedoSelection

      public AreaRef getRedoSelection()
      Specified by:
      getRedoSelection in interface UndoableAction
      Returns:
      Selection after redo of this action, null if doesn't provided;
    • getUndoSheet

      public Sheet getUndoSheet()
      Specified by:
      getUndoSheet in interface UndoableAction
      Returns:
      target sheet of undo action, null if doesn't provided
    • getRedoSheet

      public Sheet getRedoSheet()
      Specified by:
      getRedoSheet in interface UndoableAction
      Returns:
      target sheet of redo action, null if doesn't provided