Example usage for com.google.gwt.dom.client BrowserEvents DRAGLEAVE

List of usage examples for com.google.gwt.dom.client BrowserEvents DRAGLEAVE

Introduction

In this page you can find the example usage for com.google.gwt.dom.client BrowserEvents DRAGLEAVE.

Prototype

String DRAGLEAVE

To view the source code for com.google.gwt.dom.client BrowserEvents DRAGLEAVE.

Click Source Link

Usage

From source file:com.vaadin.client.extensions.DropTargetExtensionConnector.java

License:Apache License

@Override
protected void extend(ServerConnector target) {
    dropTargetWidget = ((ComponentConnector) target).getWidget();

    EventTarget dropTarget = getDropTargetElement().cast();

    // dragenter event
    dropTarget.addEventListener(BrowserEvents.DRAGENTER, dragEnterListener);

    // dragover event
    dropTarget.addEventListener(BrowserEvents.DRAGOVER, dragOverListener);

    // dragleave event
    dropTarget.addEventListener(BrowserEvents.DRAGLEAVE, dragLeaveListener);

    // drop event
    dropTarget.addEventListener(BrowserEvents.DROP, dropListener);
}

From source file:com.vaadin.client.extensions.DropTargetExtensionConnector.java

License:Apache License

@Override
public void onUnregister() {
    super.onUnregister();

    EventTarget dropTarget = getDropTargetElement().cast();

    // Remove listeners
    dropTarget.removeEventListener(BrowserEvents.DRAGENTER, dragEnterListener);
    dropTarget.removeEventListener(BrowserEvents.DRAGOVER, dragOverListener);
    dropTarget.removeEventListener(BrowserEvents.DRAGLEAVE, dragLeaveListener);
    dropTarget.removeEventListener(BrowserEvents.DROP, dropListener);
}