com.vaadin.client.ui.dd.
Class VAbstractDropHandler
- java.lang.Object
-
- com.vaadin.client.ui.dd.VAbstractDropHandler
-
All Implemented Interfaces:
Direct Known Subclasses:
@Deprecated public abstract class VAbstractDropHandler extends Object implements VDropHandler
Deprecated.Replaced in 8.1 withDropTargetExtensionConnector
Author:
Vaadin Ltd
-
-
Constructor Summary
Constructors Constructor Description VAbstractDropHandler()
Deprecated.
-
Method Summary
All Methods Modifier and Type Method Description protected abstract void
dragAccepted(VDragEvent drag)
Deprecated.
This method is called when a valid drop location was found with
AcceptCriterion
either via client or server side check.void
dragEnter(VDragEvent drag)
Deprecated.
The default implementation in
VAbstractDropHandler
checks if the Transferable is accepted.void
dragLeave(VDragEvent drag)
Deprecated.
Default implementation does nothing.
void
dragOver(VDragEvent drag)
Deprecated.
Default implementation does nothing.
boolean
drop(VDragEvent drag)
Deprecated.
The default implemmentation visits server if
AcceptCriterion
can't be verified on client or ifAcceptCriterion
are met on client.abstract ComponentConnector
getConnector()
Deprecated.
Returns the Paintable who owns this
VAbstractDropHandler
.void
updateAcceptRules(UIDL uidl)
Deprecated.
Implementor/user of
VAbstractDropHandler
must pass the UIDL painted byAcceptCriterion
to this method.protected void
validate(VAcceptCallback cb, VDragEvent event)
Deprecated.
Validates the given drag event when all existing DnD-related tasks are completed, and triggers the callback if the validation was successful.
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.client.ui.dd.VDropHandler
getApplicationConnection
-
-
-
-
Method Detail
-
updateAcceptRules
public void updateAcceptRules(UIDL uidl)
Deprecated.Implementor/user of
VAbstractDropHandler
must pass the UIDL painted byAcceptCriterion
to this method. Practically the details aboutAcceptCriterion
are saved.Parameters:
uidl
- the accept criterion UIDL
-
dragOver
public void dragOver(VDragEvent drag)
Deprecated.Default implementation does nothing.
Specified by:
dragOver
in interfaceVDropHandler
Parameters:
drag
- the latest drag event
-
dragLeave
public void dragLeave(VDragEvent drag)
Deprecated.Default implementation does nothing. Implementors should clean possible emphasis or drag icons here.
Specified by:
dragLeave
in interfaceVDropHandler
Parameters:
drag
- DragEvent which contains the transferable and other information for the operation
-
dragEnter
public void dragEnter(VDragEvent drag)
Deprecated.The default implementation in
VAbstractDropHandler
checks if the Transferable is accepted.If transferable is accepted (either via server visit or client side rules) the default implementation calls abstract
dragAccepted(VDragEvent)
method.If drop handler has distinct places where some parts may accept the
Transferable
and others don't, one should use similar validation logic in dragOver method and replace this method with empty implementation.Specified by:
dragEnter
in interfaceVDropHandler
Parameters:
drag
- DragEvent which contains the transferable and other information for the operation
-
dragAccepted
protected abstract void dragAccepted(VDragEvent drag)
Deprecated.This method is called when a valid drop location was found with
AcceptCriterion
either via client or server side check.Implementations can set some hints for users here to highlight that the drag is on a valid drop location.
Parameters:
drag
- the drag event
-
validate
protected void validate(VAcceptCallback cb, VDragEvent event)
Deprecated.Validates the given drag event when all existing DnD-related tasks are completed, and triggers the callback if the validation was successful.
Parameters:
cb
- the callback that handles acceptance if the target is validevent
- the drag event
-
drop
public boolean drop(VDragEvent drag)
Deprecated.The default implemmentation visits server if
AcceptCriterion
can't be verified on client or ifAcceptCriterion
are met on client.Specified by:
drop
in interfaceVDropHandler
Parameters:
drag
- VDragEvent which contains the transferable and other information for the operationReturns:
true if the Tranferrable of this drag event needs to be sent to the server, false if drop is rejected or no server side event should be sent
-
getConnector
public abstract ComponentConnector getConnector()
Deprecated.Returns the Paintable who owns this
VAbstractDropHandler
. Server side counterpart of the Paintable is expected to implementDropTarget
interface.Specified by:
getConnector
in interfaceVDropHandler
Returns:
the connector
-
-