Class DragEndEvent<T extends AbstractComponent>

    • Field Summary

      • Fields inherited from class java.util.EventObject

        source
    • Constructor Summary

      Constructors 
      Constructor Description
      DragEndEvent​(T source, com.vaadin.shared.ui.dnd.DropEffect dropEffect)
      Creates a drag end event.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T getComponent()
      Returns the drag source component where the dragend event occurred.
      com.vaadin.shared.ui.dnd.DropEffect getDropEffect()
      Get drop effect of the dragend event.
      boolean isCanceled()
      Returns whether the drag event was cancelled.
      • Methods inherited from class java.util.EventObject

        getSource, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DragEndEvent

        public DragEndEvent​(T source,
                            com.vaadin.shared.ui.dnd.DropEffect dropEffect)
        Creates a drag end event.
        Parameters:
        source - Component that was dragged.
        dropEffect - Drop effect from DataTransfer.dropEffect object.
    • Method Detail

      • getDropEffect

        public com.vaadin.shared.ui.dnd.DropEffect getDropEffect()
        Get drop effect of the dragend event. The value will be the desired action, that is the dropEffect value of the last dragenter or dragover event. The value depends on the effectAllowed parameter of the drag source, the dropEffect parameter of the drop target, and its drag over and drop criteria.

        If the drop is not successful, the value will be NONE.

        In case the desired drop effect is MOVE, the data being dragged should be removed from the source.

        Returns:
        The DataTransfer.dropEffect parameter of the client side dragend event.
        See Also:
        DragSourceExtension#setEffectAllowed(EffectAllowed), DropTargetExtension.setDropEffect(DropEffect), DropTargetExtension.setDropCriteriaScript(String)
      • isCanceled

        public boolean isCanceled()
        Returns whether the drag event was cancelled. This is a shorthand for dropEffect == NONE.
        Returns:
        true if the drop event was cancelled, false otherwise.
      • getComponent

        public T getComponent()
        Returns the drag source component where the dragend event occurred.
        Overrides:
        getComponent in class Component.Event
        Returns:
        Component which was dragged.