com.vaadin.ui.components.grid.
Interface DropIndexCalculator<T>
-
Type Parameters:
T
- the bean typeAll Superinterfaces:
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface DropIndexCalculator<T> extends Serializable
A handler for calculating the index of the dropped items on the drop target grid.
Since:
8.2
Author:
Vaadin Ltd
See Also:
-
-
Method Summary
All Methods Modifier and Type Method Description static <T> DropIndexCalculator<T>
alwaysDropToEnd()
Returns a calculator for always dropping items to the end of the target grid, regardless of drop position.
int
calculateDropIndex​(GridDropEvent<T> event)
Called when Items are dropped onto a target grid.
-
-
-
Method Detail
-
alwaysDropToEnd
static <T> DropIndexCalculator<T> alwaysDropToEnd()
Returns a calculator for always dropping items to the end of the target grid, regardless of drop position.
Returns:
the created drop index calculator
-
calculateDropIndex
int calculateDropIndex​(GridDropEvent<T> event)
Called when Items are dropped onto a target grid.
Parameters:
event
- the GridDropEvent.Returns:
index the target index, use
Integer.MAX_VALUE
for always dropping to end
-
-