com.vaadin.flow.component.spreadsheet.command.
Class SpreadsheetCommand
- java.lang.Object
-
- com.vaadin.flow.component.spreadsheet.command.SpreadsheetCommand
-
All Implemented Interfaces:
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 Summary
Fields Modifier and Type Field Description protected int
activeSheetIndex
protected Spreadsheet
spreadsheet
-
Constructor Summary
Constructors Constructor Description SpreadsheetCommand(Spreadsheet spreadsheet)
Creates a new command targeting the given spreadsheet.
-
Method Summary
All Methods Modifier and Type Method Description int
getActiveSheetIndex()
Returns the index of the currently active sheet.
protected org.apache.poi.ss.usermodel.Sheet
getSheet()
Returns the currently active sheet.
void
setActiveSheetIndex(int activeSheetIndex)
Sets the sheet at the given index the currently active sheet.
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.flow.component.spreadsheet.command.Command
execute, getPaintedCellRange, getSelectedCellReference
-
-
-
-
Field Detail
-
activeSheetIndex
protected int activeSheetIndex
-
spreadsheet
protected final Spreadsheet spreadsheet
-
-
Constructor Detail
-
SpreadsheetCommand
public SpreadsheetCommand(Spreadsheet spreadsheet)
Creates a new command targeting the given spreadsheet.
Parameters:
spreadsheet
- The target spreadsheet
-
-
Method Detail
-
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 interfaceCommand
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 interfaceCommand
Parameters:
activeSheetIndex
- Index of sheet to set active
-
-