Class SpreadsheetHandlerImpl

    • Constructor Detail

      • SpreadsheetHandlerImpl

        public SpreadsheetHandlerImpl​(Spreadsheet spreadsheet)
    • Method Detail

      • onSheetScroll

        public void onSheetScroll​(int firstRow,
                                  int firstColumn,
                                  int lastRow,
                                  int lastColumn)
        Description copied from interface: SpreadsheetHandler
        These cells have become visible and possibly need the content, if has not been given previously or has not changed.
        Specified by:
        onSheetScroll in interface SpreadsheetHandler
      • cellSelected

        public void cellSelected​(int row,
                                 int column,
                                 boolean discardOldRangeSelection)
        Description copied from interface: SpreadsheetHandler
        Single cell selected inside sheet.
        Specified by:
        cellSelected in interface SpreadsheetHandler
      • cellRangeSelected

        public void cellRangeSelected​(int row1,
                                      int col1,
                                      int row2,
                                      int col2)
        Description copied from interface: SpreadsheetHandler
        Cell range selected from scratch. Actual selected cell not changed.
        Specified by:
        cellRangeSelected in interface SpreadsheetHandler
      • cellRangePainted

        public void cellRangePainted​(int selectedCellRow,
                                     int selectedCellColumn,
                                     int row1,
                                     int col1,
                                     int row2,
                                     int col2)
        Description copied from interface: SpreadsheetHandler
        Cell range selected by painting
        Specified by:
        cellRangePainted in interface SpreadsheetHandler
      • cellsAddedToRangeSelection

        public void cellsAddedToRangeSelection​(int row1,
                                               int col1,
                                               int row2,
                                               int col2)
        Description copied from interface: SpreadsheetHandler
        Multiple cells added to previous range selection. Actual selected cell not changed.
        Specified by:
        cellsAddedToRangeSelection in interface SpreadsheetHandler
      • rowSelected

        public void rowSelected​(int row,
                                int firstColumnIndex)
        Description copied from interface: SpreadsheetHandler
        Complete row selected. New selected cell is at firstColumnIndex:row.
        Specified by:
        rowSelected in interface SpreadsheetHandler
        Parameters:
        row - the row that was selected
        firstColumnIndex - column index for the selected cell (left most visible)
      • rowAddedToRangeSelection

        public void rowAddedToRangeSelection​(int row,
                                             int firstColumnIndex)
        Description copied from interface: SpreadsheetHandler
        Complete row added to previous range selection. New selected cell is at firstColumnIndex:row.
        Specified by:
        rowAddedToRangeSelection in interface SpreadsheetHandler
        Parameters:
        row - the row that was selected
        firstColumnIndex - column index for the selected cell (left most visible)
      • columnSelected

        public void columnSelected​(int col,
                                   int firstRowIndex)
        Description copied from interface: SpreadsheetHandler
        Complete column selected. New selected cell is at column:firstRowIndex.
        Specified by:
        columnSelected in interface SpreadsheetHandler
        Parameters:
        col - the column that was selected
        firstRowIndex - row index for the selected cell (top most visible)
      • columnAddedToSelection

        public void columnAddedToSelection​(int firstRowIndex,
                                           int column)
        Description copied from interface: SpreadsheetHandler
        Complete column added to previous range selection. New selected cell is at column:firstRowIndex.
        Specified by:
        columnAddedToSelection in interface SpreadsheetHandler
        Parameters:
        firstRowIndex - row index for the selected cell (top most)
        column - the column that was selected
      • selectionIncreasePainted

        public void selectionIncreasePainted​(int r1,
                                             int c1,
                                             int r2,
                                             int c2)
        Description copied from interface: SpreadsheetHandler
        The new selection that was painted from the old. Values and formulas should be painted to the new selection.
        Specified by:
        selectionIncreasePainted in interface SpreadsheetHandler
        Parameters:
        r1 - new selection top, 1-based
        c1 - new selection left, 1-based
        r2 - new selection bottom, 1-based
        c2 - new selection right, 1-based
      • selectionDecreasePainted

        public void selectionDecreasePainted​(int r,
                                             int c)
        Description copied from interface: SpreadsheetHandler
        The existing selection has been painted inwards meaning that the painted selection cells should be cleared.
        Specified by:
        selectionDecreasePainted in interface SpreadsheetHandler
        Parameters:
        r - topmost cell index where the clearing starts, 1-based
        c - leftmost cell index where the clearing starts, 1-based
      • sheetSelected

        public void sheetSelected​(int tabIndex,
                                  int scrollLeft,
                                  int scrollTop)
        Specified by:
        sheetSelected in interface SpreadsheetHandler
        Parameters:
        tabIndex - 0-based
      • linkCellClicked

        public void linkCellClicked​(int row,
                                    int column)
        Description copied from interface: SpreadsheetHandler
        A cell containing a hyperlink has been clicked.
        Specified by:
        linkCellClicked in interface SpreadsheetHandler
        Parameters:
        row - 1-based
        column - 1-based
      • contextMenuOpenOnSelection

        public void contextMenuOpenOnSelection​(int row,
                                               int column)
        Description copied from interface: SpreadsheetServerRpc
        Context menu should be created for the appropriate selection.

        Selection can change if the cell at the given indexes isn't included in the previous selection.

        Specified by:
        contextMenuOpenOnSelection in interface SpreadsheetServerRpc
        Parameters:
        row - 1-based
        column - 1-based
      • rowsResized

        public void rowsResized​(Map<Integer,​Float> newRowSizes,
                                int row1,
                                int col1,
                                int row2,
                                int col2)
        Description copied from interface: SpreadsheetHandler
        Rows resized with header drag and drop. Indexes 1-based.
        Specified by:
        rowsResized in interface SpreadsheetHandler
        Parameters:
        newRowSizes - row index and new size (converted pt)
      • columnResized

        public void columnResized​(Map<Integer,​Integer> newColumnSizes,
                                  int row1,
                                  int col1,
                                  int row2,
                                  int col2)
        Description copied from interface: SpreadsheetHandler
        Columns resized with drag and drop. Indexes 1-based.
        Specified by:
        columnResized in interface SpreadsheetHandler
        Parameters:
        newColumnSizes - column index and new size (px)
      • onRowAutofit

        public void onRowAutofit​(int rowIndex)
        Description copied from interface: SpreadsheetHandler
        Row autofit with double click on the row header resizing area.
        Specified by:
        onRowAutofit in interface SpreadsheetHandler
        Parameters:
        rowIndex - 1-based
      • onColumnAutofit

        public void onColumnAutofit​(int columnIndex)
        Description copied from interface: SpreadsheetHandler
        Column autofit with double click on the column header resizing area.
        Specified by:
        onColumnAutofit in interface SpreadsheetHandler
        Parameters:
        columnIndex - 1-based
      • onConnectorInit

        public void onConnectorInit()
        Description copied from interface: SpreadsheetServerRpc
        Called when the client side connector has been initialized. This is for making sure that the non-state related stuff is cleared from server side when needed, because non state stuff is not resent to client when the component is attached again. Thus this marks that cached should be cleared etc.
        Specified by:
        onConnectorInit in interface SpreadsheetServerRpc
      • getOrCreateCell

        public org.apache.poi.ss.usermodel.Cell getOrCreateCell​(org.apache.poi.ss.usermodel.Sheet sheet,
                                                                int rowIdx,
                                                                int colIdx)
      • setGroupingCollapsed

        public void setGroupingCollapsed​(boolean isCols,
                                         int colIndex,
                                         boolean collapsed)
        Specified by:
        setGroupingCollapsed in interface GroupingHandler