use of com.vaadin.event.dd.DropTarget in project cuba by cuba-platform.
the class AbstractDefaultLayoutDropHandler method drop.
public void drop(DragAndDropEvent event) {
// Get information about the drop
TargetDetails details = event.getTargetDetails();
DropTarget layout = details.getTarget();
Component source = event.getTransferable().getSourceComponent();
if (event.getTransferable().getData("html5Data") != null) {
handleHTML5Drop(event);
} else if (layout == source) {
handleComponentReordering(event);
} else if (event.getTransferable() instanceof LayoutBoundTransferable) {
LayoutBoundTransferable transferable = (LayoutBoundTransferable) event.getTransferable();
Component comp = transferable.getComponent();
if (comp == layout) {
if (comp.getParent() instanceof DDAbsoluteLayout) {
handleDropFromAbsoluteParentLayout(event);
}
} else {
handleDropFromLayout(event);
}
}
}
Aggregations