Example usage for com.vaadin.client.ui.dd VDropHandler getConnector

List of usage examples for com.vaadin.client.ui.dd VDropHandler getConnector

Introduction

In this page you can find the example usage for com.vaadin.client.ui.dd VDropHandler getConnector.

Prototype

public ComponentConnector getConnector();

Source Link

Document

Returns the ComponentConnector with which this DropHandler is associated.

Usage

From source file:org.eclipse.hawkbit.ui.dd.client.criteria.CriterionTestHelper.java

License:Open Source License

static VDropHandler createMockedVDropHandler(String dropTargetId) {
    com.google.gwt.user.client.Element element = Mockito.mock(com.google.gwt.user.client.Element.class);
    when(element.getId()).thenReturn(dropTargetId);
    Widget widget = Mockito.mock(Widget.class);
    when(widget.getElement()).thenReturn(element);
    ComponentConnector connector = Mockito.mock(ComponentConnector.class);
    when(connector.getWidget()).thenReturn(widget);
    VDropHandler dropHandler = Mockito.mock(VDropHandler.class);
    when(dropHandler.getConnector()).thenReturn(connector);

    return dropHandler;
}