Interface DndUtil.DndJs

All Superinterfaces:
Serializable
Enclosing class:
DndUtil

@JsDefinition public static interface DndUtil.DndJs extends Serializable
What drag and drop asks of its client-side connector, as a JavaScript definition for Element.executeJs(Class).

For internal use only. May be renamed or removed in a future release.

Since:
25.4
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setDragImage(Component dragImage, int offsetX, int offsetY)
    Sets the image shown while the element is dragged.
    void
    Activates the element as a drag source, or deactivates it when it is no longer draggable.
    void
    Activates the element as a drop target, or deactivates it when it no longer accepts a drop.
  • Method Details

    • updateDragSource

      @JsExpression("window.Vaadin.Flow.dndConnector.updateDragSource(this)") void updateDragSource()
      Activates the element as a drag source, or deactivates it when it is no longer draggable.
    • updateDropTarget

      @JsExpression("window.Vaadin.Flow.dndConnector.updateDropTarget(this)") void updateDropTarget()
      Activates the element as a drop target, or deactivates it when it no longer accepts a drop.
    • setDragImage

      @JsExpression("window.Vaadin.Flow.dndConnector.setDragImage($0, $1, $2, this)") void setDragImage(Component dragImage, int offsetX, int offsetY)
      Sets the image shown while the element is dragged.
      Parameters:
      dragImage - the component to show, or null for the image the browser makes of the dragged element
      offsetX - where the pointer is in the image, horizontally
      offsetY - where the pointer is in the image, vertically