GWT Tk 0.2.3

asquare.gwt.tk.client.ui.behavior
Class DragWidgetGesture

java.lang.Object
  extended by asquare.gwt.tk.client.ui.behavior.DragWidgetGesture
All Implemented Interfaces:
DragGesture
Direct Known Subclasses:
DragPopupGesture

public class DragWidgetGesture
extends Object
implements DragGesture

A DragGesture which positions a target widget when the source widget is dragged.


Constructor Summary
DragWidgetGesture(Widget target)
           
 
Method Summary
 void finish(int x, int y)
          Called at the end of the input operation, after the last movement.
protected  Widget getDragWidget()
           
protected  void setTargetPosition(int left, int top)
          A template method which sets the position of the target widget to the specified coordinates.
 void start(int x, int y)
          Called at beginning of the input operation.
 void step(int x, int y)
          Called for each mouse movement during the input operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DragWidgetGesture

public DragWidgetGesture(Widget target)
Parameters:
target - the widget to be dragged
Method Detail

getDragWidget

protected Widget getDragWidget()

setTargetPosition

protected void setTargetPosition(int left,
                                 int top)
A template method which sets the position of the target widget to the specified coordinates. Coordinates are in the document's coordinate space (i.e. absolute position).

Parameters:
left - the x coordinate in pixels
top - the y coordinate in pixels

start

public void start(int x,
                  int y)
Description copied from interface: DragGesture
Called at beginning of the input operation. This may be triggered by a mousedown, or may be triggered by a hotkey during the middle of a drag.

Specified by:
start in interface DragGesture

step

public void step(int x,
                 int y)
Description copied from interface: DragGesture
Called for each mouse movement during the input operation.

Specified by:
step in interface DragGesture

finish

public void finish(int x,
                   int y)
Description copied from interface: DragGesture
Called at the end of the input operation, after the last movement. This may be triggered by a mouseup or may be triggered by the release of a hotkey during a drag.

Specified by:
finish in interface DragGesture

GWT Tk 0.2.3

© 2007 Mat Gessel