com.maryanovsky.gwtutils.client
Interface DragAction

All Known Implementing Classes:
MapWidget.MapDragAction

public interface DragAction

An action which may be invoked when the mouse is dragged. See UserEventManager for further details.

Author:
Maryanovsky Alexander

Method Summary
 void mouseDragEnded(Widget target, PointView releasedPoint, PointView dragOffset)
          Invoked when a mouse-drag ends.
 void mouseDragged(Widget target, PointView mousePoint, PointView dragOffset)
          Invoked when the mouse is dragged.
 void mousePressed(Widget target, PointView pressedPoint)
          Invoked on mouse-press, when the drag possibly started.
 void mouseReleased(Widget target, PointView point)
          Invoked on mouse-release, when the drag action did not occur following the mouse-press.
 

Method Detail

mousePressed

void mousePressed(Widget target,
                  PointView pressedPoint)
Invoked on mouse-press, when the drag possibly started. "possibly", because it is impossible to tell whether a mouse-press is the start of a click or a drag gesture, at the time of the mouse-press. Only when mouseDragged(Widget, PointView, PointView) is invoked, is the drag gesture confirmed.

Parameters:
target - The widget where the mouse was pressed.
pressedPoint - The point where the mouse was pressed.

mouseReleased

void mouseReleased(Widget target,
                   PointView point)
Invoked on mouse-release, when the drag action did not occur following the mouse-press. Note that this is *not* invoked when the mouse drag did occur.

Parameters:
target - The widget where the mouse-drag started.
point - The point where the mouse was pressed and released.

mouseDragged

void mouseDragged(Widget target,
                  PointView mousePoint,
                  PointView dragOffset)
Invoked when the mouse is dragged.

Parameters:
target - The widget where the mouse was dragged.
mousePoint - The current location of the mouse pointer.
dragOffset - The offset from the point where the mouse was pressed to the current point.

mouseDragEnded

void mouseDragEnded(Widget target,
                    PointView releasedPoint,
                    PointView dragOffset)
Invoked when a mouse-drag ends.

Parameters:
target - The widget where the mouse was dragged.
releasedPoint - The point where the mouse was released.
dragOffset - The offset from the point where the mouse was pressed to the current point.