com.vaadin.flow.component.spreadsheet.client.
Interface SpreadsheetHandler
-
All Superinterfaces:
All Known Subinterfaces:
All Known Implementing Classes:
public interface SpreadsheetHandler extends GroupingHandler
-
-
Method Summary
All Methods Modifier and Type Method Description void
cellAddedToSelectionAndSelected(int row, int column)
Single cell added to selection.
void
cellRangePainted(int selectedCellRow, int selectedCellColumn, int row1, int col1, int row2, int col2)
Cell range selected by painting
void
cellRangeSelected(int row1, int col1, int row2, int col2)
Cell range selected from scratch.
void
cellsAddedToRangeSelection(int row1, int col1, int row2, int col2)
Multiple cells added to previous range selection.
void
cellSelected(int row, int column, boolean oldSelectionRangeDiscarded)
Single cell selected inside sheet.
void
cellValueEdited(int row, int col, String value)
void
clearSelectedCellsOnCut()
Called after successful cut operation; currently selected cells should be cleared
void
columnAddedToSelection(int firstRowIndex, int column)
Complete column added to previous range selection.
void
columnResized(Map<Integer,Integer> newColumnSizes, int row1, int col1, int row2, int col2)
Columns resized with drag and drop.
void
columnSelected(int column, int firstRowIndex)
Complete column selected.
void
deleteSelectedCells()
Delete the contents of the selected cells, do not remove style/formatting.
void
linkCellClicked(int row, int column)
A cell containing a hyperlink has been clicked.
void
onColumnAutofit(int columnIndex)
Column autofit with double click on the column header resizing area.
void
onPaste(String text)
Client pasted text at current selection.
void
onRedo()
Client pressed redo ctrl/meta+y
void
onRowAutofit(int rowIndex)
Row autofit with double click on the row header resizing area.
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.
void
onUndo()
Client pressed undo ctrl/meta+z
void
protectedCellWriteAttempted()
Client tried to modify protected cell
void
rowAddedToRangeSelection(int row, int firstColumnIndex)
Complete row added to previous range selection.
void
rowSelected(int row, int firstColumnIndex)
Complete row selected.
void
rowsResized(Map<Integer,Float> newRowSizes, int row1, int col1, int row2, int col2)
Rows resized with header drag and drop.
void
selectionDecreasePainted(int row, int col)
The existing selection has been painted inwards meaning that the painted selection cells should be cleared.
void
selectionIncreasePainted(int r1, int c1, int r2, int c2)
The new selection that was painted from the old.
void
setCellStyleWidthRatios(HashMap<Integer,Float> cellStyleWidthRatioMap)
void
sheetAddressChanged(String value)
Address field value changed.
void
sheetCreated(int scrollLeft, int scrollTop)
Sheet is created as the last sheet
void
sheetRenamed(int sheetIndex, String newName)
void
sheetSelected(int sheetIndex, int scrollLeft, int scrollTop)
void
updateCellComment(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)
-
-