com.badlogic.gdx.scenes.scene2d.utils
Class DragAndDrop.Target

java.lang.Object
  extended by com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop.Target
Enclosing class:
DragAndDrop

public abstract static class DragAndDrop.Target
extends Object

A target where a payload can be dropped to.

Author:
Nathan Sweet

Constructor Summary
DragAndDrop.Target(Actor actor)
           
 
Method Summary
abstract  boolean drag(DragAndDrop.Source source, DragAndDrop.Payload payload, float x, float y, int pointer)
          Called when the object is dragged over the target.
abstract  void drop(DragAndDrop.Source source, DragAndDrop.Payload payload, float x, float y, int pointer)
           
 Actor getActor()
           
 void reset(DragAndDrop.Source source, DragAndDrop.Payload payload)
          Called when the object is no longer over the target, whether because the touch was moved or a drop occurred.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DragAndDrop.Target

public DragAndDrop.Target(Actor actor)
Method Detail

drag

public abstract boolean drag(DragAndDrop.Source source,
                             DragAndDrop.Payload payload,
                             float x,
                             float y,
                             int pointer)
Called when the object is dragged over the target. The coordinates are in the target's local coordinate system.

Returns:
true if this is a valid target for the object.

reset

public void reset(DragAndDrop.Source source,
                  DragAndDrop.Payload payload)
Called when the object is no longer over the target, whether because the touch was moved or a drop occurred.


drop

public abstract void drop(DragAndDrop.Source source,
                          DragAndDrop.Payload payload,
                          float x,
                          float y,
                          int pointer)

getActor

public Actor getActor()


Copyright © 2014. All Rights Reserved.