Class SpreadsheetCommand

java.lang.Object
com.vaadin.flow.component.spreadsheet.command.SpreadsheetCommand
All Implemented Interfaces:
Command, Serializable
Direct Known Subclasses:
CellValueCommand, RowInsertOrDeleteCommand, SizeChangeCommand

public abstract class SpreadsheetCommand extends Object implements Command
Abstract base class for Spreadsheet commands.
Since:
1.0
Author:
Vaadin Ltd.
See Also:
  • Field Details

    • activeSheetIndex

      protected int activeSheetIndex
    • spreadsheet

      protected final Spreadsheet spreadsheet
  • Constructor Details

    • SpreadsheetCommand

      public SpreadsheetCommand(Spreadsheet spreadsheet)
      Creates a new command targeting the given spreadsheet.
      Parameters:
      spreadsheet - The target spreadsheet
  • Method Details

    • getSheet

      protected org.apache.poi.ss.usermodel.Sheet getSheet()
      Returns the currently active sheet.
      Returns:
      active sheet
    • getActiveSheetIndex

      public int getActiveSheetIndex()
      Description copied from interface: Command
      Returns the index of the currently active sheet.
      Specified by:
      getActiveSheetIndex in interface Command
      Returns:
      index of active sheet
    • setActiveSheetIndex

      public void setActiveSheetIndex(int activeSheetIndex)
      Description copied from interface: Command
      Sets the sheet at the given index the currently active sheet.
      Specified by:
      setActiveSheetIndex in interface Command
      Parameters:
      activeSheetIndex - Index of sheet to set active