com.vaadin.flow.component.spreadsheet.
Class Spreadsheet.SelectionChangeEvent
- java.lang.Object
-
- java.util.EventObject
-
- com.vaadin.flow.component.ComponentEvent<Component>
-
- com.vaadin.flow.component.spreadsheet.Spreadsheet.SelectionChangeEvent
-
All Implemented Interfaces:
Enclosing class:
public static class Spreadsheet.SelectionChangeEvent extends ComponentEvent<Component>
This event is fired when cell selection changes.
See Also:
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description SelectionChangeEvent​(Component source, org.apache.poi.ss.util.CellReference selectedCellReference, List<org.apache.poi.ss.util.CellReference> individualSelectedCells, org.apache.poi.ss.util.CellRangeAddress selectedCellMergedRegion, List<org.apache.poi.ss.util.CellRangeAddress> cellRangeAddresses)
Creates a new selection change event.
-
Method Summary
All Methods Modifier and Type Method Description Set<org.apache.poi.ss.util.CellReference>
getAllSelectedCells()
Gets a combination of all selected cells.
List<org.apache.poi.ss.util.CellRangeAddress>
getCellRangeAddresses()
Gets all separately selected cell ranges.
List<org.apache.poi.ss.util.CellReference>
getIndividualSelectedCells()
Gets all the individually selected single cells in the current selection.
org.apache.poi.ss.util.CellRangeAddress
getSelectedCellMergedRegion()
Gets the merged region the single selected cell is a part of, if applicable.
org.apache.poi.ss.util.CellReference
getSelectedCellReference()
Returns reference to the currently selected single cell OR in case of multiple selections the last cell clicked OR in case of area select the cell from which the area selection was started.
Spreadsheet
getSpreadsheet()
Gets the Spreadsheet where this event happened.
-
Methods inherited from class com.vaadin.flow.component.ComponentEvent
getSource, isFromClient, unregisterListener
-
Methods inherited from class java.util.EventObject
toString
-
-
-
-
Constructor Detail
-
SelectionChangeEvent
public SelectionChangeEvent​(Component source, org.apache.poi.ss.util.CellReference selectedCellReference, List<org.apache.poi.ss.util.CellReference> individualSelectedCells, org.apache.poi.ss.util.CellRangeAddress selectedCellMergedRegion, List<org.apache.poi.ss.util.CellRangeAddress> cellRangeAddresses)
Creates a new selection change event.
Parameters:
source
- Source SpreadsheetselectedCellReference
- seegetSelectedCellReference()
individualSelectedCells
- seegetIndividualSelectedCells()
selectedCellMergedRegion
- seegetSelectedCellMergedRegion()
cellRangeAddresses
- seegetCellRangeAddresses()
-
-
Method Detail
-
getSpreadsheet
public Spreadsheet getSpreadsheet()
Gets the Spreadsheet where this event happened.
Returns:
Source Spreadsheet
-
getSelectedCellReference
public org.apache.poi.ss.util.CellReference getSelectedCellReference()
Returns reference to the currently selected single cell OR in case of multiple selections the last cell clicked OR in case of area select the cell from which the area selection was started.
Returns:
CellReference to the single selected cell, or the last cell selected manually (e.g. with ctrl+mouseclick)
-
getIndividualSelectedCells
public List<org.apache.poi.ss.util.CellReference> getIndividualSelectedCells()
Gets all the individually selected single cells in the current selection.
Returns:
All non-contiguously selected cells (e.g. with ctrl+mouseclick)
-
getSelectedCellMergedRegion
public org.apache.poi.ss.util.CellRangeAddress getSelectedCellMergedRegion()
Gets the merged region the single selected cell is a part of, if applicable.
Returns:
The
CellRangeAddress
described the merged region the single selected cell is part of, if any.
-
getCellRangeAddresses
public List<org.apache.poi.ss.util.CellRangeAddress> getCellRangeAddresses()
Gets all separately selected cell ranges.
Returns:
All separately selected cell ranges (e.g. with ctrl+shift+mouseclick)
-
getAllSelectedCells
public Set<org.apache.poi.ss.util.CellReference> getAllSelectedCells()
Gets a combination of all selected cells.
Returns:
A combination of all selected cells, regardless of selection mode. Doesn't contain duplicates.
-
-