Package com.vaadin.client.ui.dd
Class DragAndDropHandler
- java.lang.Object
-
- com.vaadin.client.ui.dd.DragAndDropHandler
-
public class DragAndDropHandler extends Object
A simple event handler for elements that can be drag and dropped. Properly handles drag start, cancel and end. For example, used inGrid
column header reordering.The showing of the dragged element, drag hints and reacting to drop/cancel is delegated to
DragAndDropHandler.DragAndDropCallback
implementation.- Since:
- 7.5.0
- Author:
- Vaadin Ltd
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
DragAndDropHandler.DragAndDropCallback
Callback interface for drag and drop.
-
Constructor Summary
Constructors Constructor Description DragAndDropHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onDragStartOnDraggableElement(com.google.gwt.dom.client.NativeEvent dragStartingEvent, DragAndDropHandler.DragAndDropCallback callback)
This method can be called to trigger drag and drop on any grid element that can be dragged and dropped.
-
-
-
Method Detail
-
onDragStartOnDraggableElement
public void onDragStartOnDraggableElement(com.google.gwt.dom.client.NativeEvent dragStartingEvent, DragAndDropHandler.DragAndDropCallback callback)
This method can be called to trigger drag and drop on any grid element that can be dragged and dropped.- Parameters:
dragStartingEvent
- the drag triggering event, usually aEvent.ONMOUSEDOWN
orEvent.ONTOUCHSTART
event on the draggable elementcallback
- the callback that will handle actual drag and drop related operations
-
-