Class Spreadsheet.SheetChangeEvent
java.lang.Object
java.util.EventObject
com.vaadin.flow.component.ComponentEvent<com.vaadin.flow.component.Component>
com.vaadin.flow.component.spreadsheet.Spreadsheet.SheetChangeEvent
- All Implemented Interfaces:
Serializable
- Enclosing class:
- Spreadsheet
public static class Spreadsheet.SheetChangeEvent
extends com.vaadin.flow.component.ComponentEvent<com.vaadin.flow.component.Component>
An event that is fired to registered listeners when the selected sheet
has been changed.
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionSheetChangeEvent(com.vaadin.flow.component.Component source, org.apache.poi.ss.usermodel.Sheet newSheet, org.apache.poi.ss.usermodel.Sheet previousSheet, int newSheetVisibleIndex, int newSheetPOIIndex) Creates a new SheetChangeEvent. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.poi.ss.usermodel.SheetGets the newly selected sheet.intGets the POI index of the newly selected sheet.intGets the index of the newly selected sheet among all visible sheets.org.apache.poi.ss.usermodel.SheetGets the sheet that was previously selected.Methods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, isFromClient, unregisterListenerMethods inherited from class java.util.EventObject
toString
-
Constructor Details
-
SheetChangeEvent
public SheetChangeEvent(com.vaadin.flow.component.Component source, org.apache.poi.ss.usermodel.Sheet newSheet, org.apache.poi.ss.usermodel.Sheet previousSheet, int newSheetVisibleIndex, int newSheetPOIIndex) Creates a new SheetChangeEvent.- Parameters:
source- Spreadsheet that triggered the eventnewSheet- New selectionpreviousSheet- Previous selectionnewSheetVisibleIndex- New visible index of selectionnewSheetPOIIndex- New POI index of selection
-
-
Method Details
-
getNewSheet
public org.apache.poi.ss.usermodel.Sheet getNewSheet()Gets the newly selected sheet.- Returns:
- The new selection
-
getPreviousSheet
public org.apache.poi.ss.usermodel.Sheet getPreviousSheet()Gets the sheet that was previously selected.- Returns:
- The previous selection
-
getNewSheetVisibleIndex
public int getNewSheetVisibleIndex()Gets the index of the newly selected sheet among all visible sheets.- Returns:
- Index of new selection among visible sheets
-
getNewSheetPOIIndex
public int getNewSheetPOIIndex()Gets the POI index of the newly selected sheet.- Returns:
- POI index of new selection
-