Class 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:
    Serialized Form
    • Constructor Detail

      • 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 event
        newSheet - New selection
        previousSheet - Previous selection
        newSheetVisibleIndex - New visible index of selection
        newSheetPOIIndex - New POI index of selection
    • Method Detail

      • 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