T - The Grid bean type.public class GridDropEvent<T> extends DropEvent<Grid<T>>
Grid row.GridDropTarget.addGridDropListener(GridDropListener),
Serialized Formsource| Constructor and Description |
|---|
GridDropEvent(Grid<T> target,
Map<String,String> data,
DropEffect dropEffect,
DragSourceExtension<? extends AbstractComponent> dragSourceExtension,
T dropTargetRow,
DropLocation dropLocation,
MouseEventDetails mouseEventDetails)
Creates a Grid row drop event.
|
| Modifier and Type | Method and Description |
|---|---|
DropLocation |
getDropLocation()
Get the location of the drop within the row.
|
Optional<T> |
getDropTargetRow()
Get the row the drop happened on.
|
getComponent, getDataTransferData, getDataTransferData, getDataTransferText, getDragData, getDragSourceComponent, getDragSourceExtension, getDropEffect, getMouseEventDetailsgetConnectorgetSource, toStringpublic GridDropEvent(Grid<T> target, Map<String,String> data, DropEffect dropEffect, DragSourceExtension<? extends AbstractComponent> dragSourceExtension, T dropTargetRow, DropLocation dropLocation, MouseEventDetails mouseEventDetails)
target - Grid that received the drop.data - Map containing all types and corresponding data from the
DataTransfer object.dropEffect - the desired drop effectdragSourceExtension - Drag source extension of the component that initiated the drop
event.dropTargetRow - Target row that received the drop, or null if dropped
on empty grid or DropMode.ON_GRID is useddropLocation - Location of the drop within the target row.mouseEventDetails - mouse event details object containing information about the
drop eventpublic Optional<T> getDropTargetRow()
If the drop was not on top of a row (see getDropLocation()) or
DropMode.ON_GRID is used, then returns an empty optional.
public DropLocation getDropLocation()
NOTE: the location will be DropLocation.EMPTY if:
DropMode.ON_GRID was usedDropMode.ON_TOP is used and the drop happened on empty space
after last row or on top of the header / footer
getDropTargetRow() or DropLocation.EMPTY if no
target row presentGridDropTarget.setDropMode(DropMode)Copyright © 2019 Vaadin Ltd. All rights reserved.