com.vaadin.terminal.gwt.client.ui.dd.


Interface VDropHandler

All Known Implementing Classes:

VAbstractDropHandler, VDragAndDropWrapper.CustomDropHandler, VScrollTable.VScrollTableDropHandler

public interface VDropHandler

Vaadin Widgets that want to receive something via drag and drop implement this interface.

Method Summary
 void dragEnter(VDragEvent dragEvent)
          Called by DragAndDropManager when a drag operation is in progress and the cursor enters the area occupied by this Paintable.
 void dragLeave(VDragEvent dragEvent)
          Called by DragAndDropManager when a drag operation is in progress and the cursor leaves the area occupied by this Paintable.
 void dragOver(VDragEvent currentDrag)
          When drag is over current drag handler.
 boolean drop(VDragEvent drag)
          Called by DragAndDropManager when a drag operation was in progress and a drop was performed on this Paintable.
 ApplicationConnection getApplicationConnection()
          Returns the application connection to which this VDropHandler belongs to.
 Paintable getPaintable()
          Returns the Paintable into which this DragHandler is associated
 

Method Detail

dragEnter

void dragEnter(VDragEvent dragEvent)

Called by DragAndDropManager when a drag operation is in progress and the cursor enters the area occupied by this Paintable.

Parameters:
dragEvent - DragEvent which contains the transferable and other information for the operation

dragLeave

void dragLeave(VDragEvent dragEvent)

Called by DragAndDropManager when a drag operation is in progress and the cursor leaves the area occupied by this Paintable.

Parameters:
dragEvent - DragEvent which contains the transferable and other information for the operation

drop

boolean drop(VDragEvent drag)

Called by DragAndDropManager when a drag operation was in progress and a drop was performed on this Paintable.

Parameters:
dragEvent - DragEvent which contains the transferable and other information for the operation
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

dragOver

void dragOver(VDragEvent currentDrag)

When drag is over current drag handler. With drag implementation by VDragAndDropManager will be called when mouse is moved. HTML5 implementations call this continuously even though mouse is not moved.

Parameters:
currentDrag -

getPaintable

Paintable getPaintable()

Returns the Paintable into which this DragHandler is associated

getApplicationConnection

ApplicationConnection getApplicationConnection()

Returns the application connection to which this VDropHandler belongs to. DragAndDropManager uses this fucction to send Transferable to server side.