com.threecoffee.util
Class DragAdapter

java.lang.Object
  extended by com.threecoffee.util.DragAdapter

public class DragAdapter
extends java.lang.Object

Simple class to enable mouse-dragging a Sprite.

Author:
Divyansh Prakash

Constructor Summary
DragAdapter(Sprite s)
          Enables dragging the given Sprite.
 
Method Summary
 Sprite getSprite()
          Returns the Sprite that this DragAdapter has control of.
 void pressed()
          Called when the mouse has been pressed.
 void released()
          Called when the mouse has been released.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DragAdapter

public DragAdapter(Sprite s)
Enables dragging the given Sprite.

Method Detail

released

public void released()
Called when the mouse has been released.


pressed

public void pressed()
Called when the mouse has been pressed.


getSprite

public Sprite getSprite()
Returns the Sprite that this DragAdapter has control of.