DropListener
@Deprecated public interface DropHandler extends Serializable
The drop(DragAndDropEvent)
method is used to receive the transferred
data and the getAcceptCriterion()
method contains the (possibly
client side verifiable) criterion whether the dragged data will be handled at
all.
Modifier and Type | Method and Description |
---|---|
void |
drop(DragAndDropEvent event)
Deprecated.
Drop method is called when the end user has finished the drag operation
on a
DropTarget and DragAndDropEvent has passed
AcceptCriterion defined by getAcceptCriterion() method. |
AcceptCriterion |
getAcceptCriterion()
Deprecated.
Returns the
AcceptCriterion used to evaluate whether the
Transferable will be handed over to
drop(DragAndDropEvent) method. |
void drop(DragAndDropEvent event)
DropTarget
and DragAndDropEvent
has passed
AcceptCriterion
defined by getAcceptCriterion()
method.
The actual business logic of drag and drop operation is implemented into
this method.event
- the event related to this dropAcceptCriterion getAcceptCriterion()
AcceptCriterion
used to evaluate whether the
Transferable
will be handed over to
drop(DragAndDropEvent)
method. If client side can't
verify the AcceptCriterion
, the same criteria may be tested also
prior to actual drop - during the drag operation.
Based on information from AcceptCriterion
components may display
some hints for the end user whether the drop will be accepted or not.
Vaadin contains a variety of criteria built in that can be composed to
more complex criterion. If the build in criteria are not enough,
developer can use a ServerSideCriterion
or build own custom
criterion with client side counterpart.
If developer wants to handle everything in the
drop(DragAndDropEvent)
method, AcceptAll
instance can be
returned.
AcceptCriterion
Copyright © 2018 Vaadin Ltd. All rights reserved.