com.holonplatform.vaadin.flow.components.events

## Interface ItemListingDropEvent<T,P>

- Type Parameters:
    `T` - Item type
    `P` - Item property type
  All Superinterfaces:
    Event<ItemListing<T,P>>, ItemListingDnDEvent<T,P>, Serializable

      public interface ItemListingDropEvent<T,P>
      extends ItemListingDnDEvent<T,P>

  Drop event that occurs on the `ItemListing` or its rows.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Map<String,String>` | `getDataTransferData()` Get all of the transfer data from the `DataTransfer` object.
    `Optional<String>` | `getDataTransferData(String type)` Get data from the `DataTransfer` object.
    `String` | `getDataTransferText()` Get data of any of the types `text`, `Text` or `text/plain`.
    `com.vaadin.flow.component.grid.dnd.GridDropLocation` | `getDropLocation()` Get the location of the drop within the row.
    `Optional<T>` | `getDropTargetItem()` Get the row the drop happened on.

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.events.ItemListingDnDEvent

      `isFromClient`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.events.Event

      `getSource`

- - ### Method Detail

    - #### getDropTargetItem

          Optional<T> getDropTargetItem()

      Get the row the drop happened on.

      If the drop was not on top of a row (see `getDropLocation()`) or `GridDropMode.ON_GRID` is used, then returns an empty optional.

      Returns:
        The item of the row the drop happened on, or an empty Optional if drop was not on a row

    - #### getDropLocation

          com.vaadin.flow.component.grid.dnd.GridDropLocation getDropLocation()

      Get the location of the drop within the row.

      NOTE: the location will be `GridDropLocation.EMPTY` if:

      - dropped on an empty grid
      - dropping on rows was not possible because of `GridDropMode.ON_GRID` was used
      - `GridDropMode.ON_TOP` is used and the drop happened on empty space after last row or on top of the header / footer
      Returns:
        The location of the drop in relative to the `getDropTargetItem()` or `GridDropLocation.EMPTY` if no target row present

    - #### getDataTransferData

          Optional<String> getDataTransferData(String type)

      Get data from the `DataTransfer` object.
      Parameters:
        `type` - Data format, e.g. `text/plain` or `text/uri-list`.
      Returns:
        Optional data for the given format if exists in the `DataTransfer`, otherwise an empty Optional

    - #### getDataTransferText

          String getDataTransferText()

      Get data of any of the types `text`, `Text` or `text/plain`.
      Returns:
        First existing data of types in order `text`, `Text` or `text/plain`, or `null` if none of them exist.

    - #### getDataTransferData

          Map<String,String> getDataTransferData()

      Get all of the transfer data from the `DataTransfer` object. The data can be iterated to find the most relevant data as it preserves the order in which the data was set to the drag source element.
      Returns:
        Map of type/data pairs, containing all the data from the `DataTransfer` object.

Copyright © 2020 The Holon Platform. All rights reserved.