Package com.vaadin.client.ui
Class VDragAndDropWrapper.CustomDropHandler
- java.lang.Object
-
- com.vaadin.client.ui.dd.VAbstractDropHandler
-
- com.vaadin.client.ui.VDragAndDropWrapper.CustomDropHandler
-
- All Implemented Interfaces:
VDropHandler
- Enclosing class:
- VDragAndDropWrapper
public class VDragAndDropWrapper.CustomDropHandler extends VAbstractDropHandler
-
-
Constructor Summary
Constructors Constructor Description CustomDropHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddragAccepted(VDragEvent drag)This method is called when a valid drop location was found withAcceptCriterioneither via client or server side check.voiddragEnter(VDragEvent drag)The default implementation inVAbstractDropHandlerchecks if the Transferable is accepted.voiddragLeave(VDragEvent drag)Default implementation does nothing.voiddragOver(VDragEvent drag)Default implementation does nothing.booleandrop(VDragEvent drag)The default implemmentation visits server ifAcceptCriterioncan't be verified on client or ifAcceptCriterionare met on client.ApplicationConnectiongetApplicationConnection()Returns the application connection to which thisVDropHandlerbelongs to.ComponentConnectorgetConnector()Returns the Paintable who owns thisVAbstractDropHandler.-
Methods inherited from class com.vaadin.client.ui.dd.VAbstractDropHandler
updateAcceptRules, validate
-
-
-
-
Method Detail
-
dragEnter
public void dragEnter(VDragEvent drag)
Description copied from class:VAbstractDropHandlerThe default implementation inVAbstractDropHandlerchecks if the Transferable is accepted.If transferable is accepted (either via server visit or client side rules) the default implementation calls abstract
VAbstractDropHandler.dragAccepted(VDragEvent)method.If drop handler has distinct places where some parts may accept the
Transferableand others don't, one should use similar validation logic in dragOver method and replace this method with empty implementation.- Specified by:
dragEnterin interfaceVDropHandler- Overrides:
dragEnterin classVAbstractDropHandler- Parameters:
drag- DragEvent which contains the transferable and other information for the operation
-
dragLeave
public void dragLeave(VDragEvent drag)
Description copied from class:VAbstractDropHandlerDefault implementation does nothing. Implementors should clean possible emphasis or drag icons here.- Specified by:
dragLeavein interfaceVDropHandler- Overrides:
dragLeavein classVAbstractDropHandler- Parameters:
drag- DragEvent which contains the transferable and other information for the operation
-
dragOver
public void dragOver(VDragEvent drag)
Description copied from class:VAbstractDropHandlerDefault implementation does nothing.- Specified by:
dragOverin interfaceVDropHandler- Overrides:
dragOverin classVAbstractDropHandler
-
drop
public boolean drop(VDragEvent drag)
Description copied from class:VAbstractDropHandlerThe default implemmentation visits server ifAcceptCriterioncan't be verified on client or ifAcceptCriterionare met on client.- Specified by:
dropin interfaceVDropHandler- Overrides:
dropin classVAbstractDropHandler- Returns:
- 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
-
dragAccepted
protected void dragAccepted(VDragEvent drag)
Description copied from class:VAbstractDropHandlerThis method is called when a valid drop location was found withAcceptCriterioneither 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.
- Specified by:
dragAcceptedin classVAbstractDropHandler
-
getConnector
public ComponentConnector getConnector()
Description copied from class:VAbstractDropHandlerReturns the Paintable who owns thisVAbstractDropHandler. Server side counterpart of the Paintable is expected to implementDropTargetinterface.- Specified by:
getConnectorin interfaceVDropHandler- Specified by:
getConnectorin classVAbstractDropHandler
-
getApplicationConnection
public ApplicationConnection getApplicationConnection()
Description copied from interface:VDropHandlerReturns the application connection to which thisVDropHandlerbelongs to. DragAndDropManager uses this fucction to send Transferable to server side.
-
-