Interface SpreadsheetHandler
-
- All Superinterfaces:
GroupingHandler
- All Known Subinterfaces:
SpreadsheetServerRpc
- All Known Implementing Classes:
SpreadsheetHandlerImpl
public interface SpreadsheetHandler extends GroupingHandler
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcellAddedToSelectionAndSelected(int row, int column)Single cell added to selection.voidcellRangePainted(int selectedCellRow, int selectedCellColumn, int row1, int col1, int row2, int col2)Cell range selected by paintingvoidcellRangeSelected(int row1, int col1, int row2, int col2)Cell range selected from scratch.voidcellsAddedToRangeSelection(int row1, int col1, int row2, int col2)Multiple cells added to previous range selection.voidcellSelected(int row, int column, boolean oldSelectionRangeDiscarded)Single cell selected inside sheet.voidcellValueEdited(int row, int col, String value)voidclearSelectedCellsOnCut()Called after successful cut operation; currently selected cells should be clearedvoidcolumnAddedToSelection(int firstRowIndex, int column)Complete column added to previous range selection.voidcolumnResized(Map<Integer,Integer> newColumnSizes, int row1, int col1, int row2, int col2)Columns resized with drag and drop.voidcolumnSelected(int column, int firstRowIndex)Complete column selected.voiddeleteSelectedCells()Delete the contents of the selected cells, do not remove style/formatting.voidlinkCellClicked(int row, int column)A cell containing a hyperlink has been clicked.voidonColumnAutofit(int columnIndex)Column autofit with double click on the column header resizing area.voidonPaste(String text)Client pasted text at current selection.voidonRedo()Client pressed redo ctrl/meta+yvoidonRowAutofit(int rowIndex)Row autofit with double click on the row header resizing area.voidonSheetScroll(int firstRow, int firstColumn, int lastRow, int lastColumn)These cells have become visible and possibly need the content, if has not been given previously or has not changed.voidonUndo()Client pressed undo ctrl/meta+zvoidprotectedCellWriteAttempted()Client tried to modify protected cellvoidrowAddedToRangeSelection(int row, int firstColumnIndex)Complete row added to previous range selection.voidrowSelected(int row, int firstColumnIndex)Complete row selected.voidrowsResized(Map<Integer,Float> newRowSizes, int row1, int col1, int row2, int col2)Rows resized with header drag and drop.voidselectionDecreasePainted(int row, int col)The existing selection has been painted inwards meaning that the painted selection cells should be cleared.voidselectionIncreasePainted(int r1, int c1, int r2, int c2)The new selection that was painted from the old.voidsetCellStyleWidthRatios(HashMap<Integer,Float> cellStyleWidthRatioMap)voidsheetAddressChanged(String value)Address field value changed.voidsheetCreated(int scrollLeft, int scrollTop)Sheet is created as the last sheetvoidsheetRenamed(int sheetIndex, String newName)voidsheetSelected(int sheetIndex, int scrollLeft, int scrollTop)voidupdateCellComment(String text, int col, int row)-
Methods inherited from interface com.vaadin.flow.component.spreadsheet.client.GroupingHandler
levelHeaderClicked, setGroupingCollapsed
-
-
-
-
Method Detail
-
onSheetScroll
void onSheetScroll(int firstRow, int firstColumn, int lastRow, int lastColumn)These cells have become visible and possibly need the content, if has not been given previously or has not changed.
-
sheetAddressChanged
void sheetAddressChanged(String value)
Address field value changed.
-
cellSelected
void cellSelected(int row, int column, boolean oldSelectionRangeDiscarded)Single cell selected inside sheet.
-
cellRangeSelected
void cellRangeSelected(int row1, int col1, int row2, int col2)Cell range selected from scratch. Actual selected cell not changed.
-
cellAddedToSelectionAndSelected
void cellAddedToSelectionAndSelected(int row, int column)Single cell added to selection. Selection changed to this.
-
cellsAddedToRangeSelection
void cellsAddedToRangeSelection(int row1, int col1, int row2, int col2)Multiple cells added to previous range selection. Actual selected cell not changed.
-
rowSelected
void rowSelected(int row, int firstColumnIndex)Complete row selected. New selected cell is at firstColumnIndex:row.- Parameters:
row- the row that was selectedfirstColumnIndex- column index for the selected cell (left most visible)
-
rowAddedToRangeSelection
void rowAddedToRangeSelection(int row, int firstColumnIndex)Complete row added to previous range selection. New selected cell is at firstColumnIndex:row.- Parameters:
row- the row that was selectedfirstColumnIndex- column index for the selected cell (left most visible)
-
columnSelected
void columnSelected(int column, int firstRowIndex)Complete column selected. New selected cell is at column:firstRowIndex.- Parameters:
column- the column that was selectedfirstRowIndex- row index for the selected cell (top most visible)
-
columnAddedToSelection
void columnAddedToSelection(int firstRowIndex, int column)Complete column added to previous range selection. New selected cell is at column:firstRowIndex.- Parameters:
firstRowIndex- row index for the selected cell (top most)column- the column that was selected
-
selectionIncreasePainted
void selectionIncreasePainted(int r1, int c1, int r2, int c2)The new selection that was painted from the old. Values and formulas should be painted to the new selection.- Parameters:
r1- new selection top, 1-basedc1- new selection left, 1-basedr2- new selection bottom, 1-basedc2- new selection right, 1-based
-
selectionDecreasePainted
void selectionDecreasePainted(int row, int col)The existing selection has been painted inwards meaning that the painted selection cells should be cleared.- Parameters:
row- topmost cell index where the clearing starts, 1-basedcol- leftmost cell index where the clearing starts, 1-based
-
cellValueEdited
void cellValueEdited(int row, int col, String value)
-
sheetSelected
void sheetSelected(int sheetIndex, int scrollLeft, int scrollTop)- Parameters:
sheetIndex- 0-basedscrollTop-scrollLeft-
-
sheetRenamed
void sheetRenamed(int sheetIndex, String newName)- Parameters:
sheetIndex- 0-basednewName-
-
sheetCreated
void sheetCreated(int scrollLeft, int scrollTop)Sheet is created as the last sheet- Parameters:
scrollTop-scrollLeft-
-
cellRangePainted
void cellRangePainted(int selectedCellRow, int selectedCellColumn, int row1, int col1, int row2, int col2)Cell range selected by painting- Parameters:
selectedCellRow-selectedCellColumn-row1-col1-row2-col2-
-
deleteSelectedCells
void deleteSelectedCells()
Delete the contents of the selected cells, do not remove style/formatting.
-
linkCellClicked
void linkCellClicked(int row, int column)A cell containing a hyperlink has been clicked.- Parameters:
row- 1-basedcolumn- 1-based
-
rowsResized
void rowsResized(Map<Integer,Float> newRowSizes, int row1, int col1, int row2, int col2)
Rows resized with header drag and drop. Indexes 1-based.- Parameters:
newRowSizes- row index and new size (converted pt)row1-col1-row2-col2-
-
columnResized
void columnResized(Map<Integer,Integer> newColumnSizes, int row1, int col1, int row2, int col2)
Columns resized with drag and drop. Indexes 1-based.- Parameters:
row1-col1-row2-col2-newColumnSizes- column index and new size (px)
-
onRowAutofit
void onRowAutofit(int rowIndex)
Row autofit with double click on the row header resizing area.- Parameters:
rowIndex- 1-based
-
onColumnAutofit
void onColumnAutofit(int columnIndex)
Column autofit with double click on the column header resizing area.- Parameters:
columnIndex- 1-based
-
onUndo
void onUndo()
Client pressed undo ctrl/meta+z
-
onRedo
void onRedo()
Client pressed redo ctrl/meta+y
-
setCellStyleWidthRatios
void setCellStyleWidthRatios(HashMap<Integer,Float> cellStyleWidthRatioMap)
-
protectedCellWriteAttempted
void protectedCellWriteAttempted()
Client tried to modify protected cell
-
onPaste
void onPaste(String text)
Client pasted text at current selection.- Parameters:
text-
-
clearSelectedCellsOnCut
void clearSelectedCellsOnCut()
Called after successful cut operation; currently selected cells should be cleared
-
updateCellComment
void updateCellComment(String text, int col, int row)
-
-