public abstract class AbstractMouseDragHandler extends Object implements com.google.gwt.event.dom.client.MouseDownHandler, com.google.gwt.event.dom.client.MouseUpHandler, com.google.gwt.event.dom.client.MouseMoveHandler, com.google.gwt.user.client.Event.NativePreviewHandler, AbstractCustomHandler
| Modifier and Type | Field and Description | 
|---|---|
| private int | mouseXThe initial x position while dragging the mouse. | 
| private int | mouseYThe initial y position while dragging the mouse. | 
| private com.google.gwt.event.shared.HandlerRegistration | registrationThe  HandlerRegistrationfor the global mouse-listener registration while dragging ornull. | 
| Constructor and Description | 
|---|
| AbstractMouseDragHandler()The constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| int | getMouseX() | 
| int | getMouseY() | 
| protected void | initializeOnMouseDown(com.google.gwt.event.dom.client.MouseDownEvent event)Override to add initialization logic to  onMouseDown(MouseDownEvent). | 
| protected boolean | isActive()This method can be overridden for dynamic activation of this handler. | 
| void | onMouseDown(com.google.gwt.event.dom.client.MouseDownEvent event) | 
| protected abstract void | onMouseMove(int deltaX,
           int deltaY,
           com.google.gwt.dom.client.NativeEvent nativeEvent) | 
| void | onMouseMove(com.google.gwt.event.dom.client.MouseMoveEvent event) | 
| void | onMouseUp(com.google.gwt.event.dom.client.MouseUpEvent event) | 
| void | onPreviewNativeEvent(com.google.gwt.user.client.Event.NativePreviewEvent event) | 
| void | register(com.google.gwt.user.client.ui.Widget widget,
        HandlerRegistrationCollector collector)This method registers this custom handler in the given  Widget. | 
private int mouseX
private int mouseY
private com.google.gwt.event.shared.HandlerRegistration registration
HandlerRegistration for the global mouse-listener registration while dragging or
 null.public int getMouseX()
public int getMouseY()
protected boolean isActive()
true if this handler is active, false if it is inactive (ignores all
         events and does nothing).public final void onMouseDown(com.google.gwt.event.dom.client.MouseDownEvent event)
onMouseDown in interface com.google.gwt.event.dom.client.MouseDownHandlerprotected void initializeOnMouseDown(com.google.gwt.event.dom.client.MouseDownEvent event)
onMouseDown(MouseDownEvent).event - is the initial MouseDownEvent.public void onPreviewNativeEvent(com.google.gwt.user.client.Event.NativePreviewEvent event)
onPreviewNativeEvent in interface com.google.gwt.user.client.Event.NativePreviewHandlerpublic void onMouseMove(com.google.gwt.event.dom.client.MouseMoveEvent event)
onMouseMove in interface com.google.gwt.event.dom.client.MouseMoveHandlerprotected abstract void onMouseMove(int deltaX,
                                    int deltaY,
                                    com.google.gwt.dom.client.NativeEvent nativeEvent)
deltaX - is the relative movement of the mouse position on X-axis.deltaY - is the relative movement of the mouse position on Y-axis.nativeEvent - is the NativeEvent that triggered this invocation.onMouseMove(MouseMoveEvent)public void onMouseUp(com.google.gwt.event.dom.client.MouseUpEvent event)
onMouseUp in interface com.google.gwt.event.dom.client.MouseUpHandlerpublic void register(com.google.gwt.user.client.ui.Widget widget,
                     HandlerRegistrationCollector collector)
Widget. It will also ensure that the
 Widget is properly configured to send the required events (e.g. via
 sends).register in interface AbstractCustomHandlerwidget - is the Widget where to register this handler.collector - is the HandlerRegistrationCollector where to collect the
        HandlerRegistration(s) of the registered handlers. May be
        null to ignore all registrations.Copyright © 2001–2016 mmm-Team. All rights reserved.