Example usage for com.vaadin.client WidgetUtil getElementUnderMouse

List of usage examples for com.vaadin.client WidgetUtil getElementUnderMouse

Introduction

In this page you can find the example usage for com.vaadin.client WidgetUtil getElementUnderMouse.

Prototype

public static Element getElementUnderMouse(NativeEvent event) 

Source Link

Document

Find the element corresponding to the coordinates in the passed mouse event.

Usage

From source file:com.haulmont.cuba.web.widgets.client.tabsheet.CubaTabSheetWidget.java

License:Apache License

protected void handleBadDD(NativeEvent event) {
    Element target = WidgetUtil.getElementUnderMouse(event);
    if (target == null) {
        VDragAndDropManager.get().interruptDrag();
        return;/* ww  w  .  ja v  a 2  s .c o m*/
    }

    Node targetParent = DOM.asOld(target).getParentNode();
    if (!getElement().isOrHasChild(targetParent)) {
        VDragAndDropManager.get().interruptDrag();
    }
}