-
public interface OnItemDragListener<T extends Object>Listener for the dragging events of list items.
-
-
Method Summary
Modifier and Type Method Description abstract UnitonItemDragged(Integer previousPosition, Integer newPosition, T item)Callback for whenever an item that is being dragged exchanges positions with another one. abstract UnitonItemDropped(Integer initialPosition, Integer finalPosition, T item)Callback for when the drag & drop event has completed because the user has dropped the item. -
-
Method Detail
-
onItemDragged
abstract Unit onItemDragged(Integer previousPosition, Integer newPosition, T item)
Callback for whenever an item that is being dragged exchanges positions with another one. It will be called every time an exchange occurs, no matter if the user is still dragging the item or not.
- Parameters:
previousPosition- The old position of the item that has just been exchanged with the dragged one.newPosition- The new position of the dragged item.item- The dragged item.
-
onItemDropped
abstract Unit onItemDropped(Integer initialPosition, Integer finalPosition, T item)
Callback for when the drag & drop event has completed because the user has dropped the item.
- Parameters:
initialPosition- The position of the item before the user started dragging it.finalPosition- The position in which the user has dropped the item.item- The dropped item.
-
-
-
-