Package com.prineside.tdi2.scene2d.utils
Class DragAndDrop.Target
java.lang.Object
com.prineside.tdi2.scene2d.utils.DragAndDrop.Target
- Enclosing class:
- DragAndDrop
A target where a payload can be dropped to.
- Author:
- Nathan Sweet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
drag
(DragAndDrop.Source source, DragAndDrop.Payload payload, float x, float y, int pointer) Called when the payload is dragged over the target.abstract void
drop
(DragAndDrop.Source source, DragAndDrop.Payload payload, float x, float y, int pointer) Called when the payload is dropped on the target.getActor()
void
reset
(DragAndDrop.Source source, DragAndDrop.Payload payload) Called when the payload is no longer over the target, whether because the touch was moved or a drop occurred.
-
Constructor Details
-
Target
-
-
Method Details
-
drag
public abstract boolean drag(DragAndDrop.Source source, DragAndDrop.Payload payload, float x, float y, int pointer) Called when the payload 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 payload.
-
reset
Called when the payload is no longer over the target, whether because the touch was moved or a drop occurred. This is called even ifdrag(Source, Payload, float, float, int)
returned false. -
drop
public abstract void drop(DragAndDrop.Source source, DragAndDrop.Payload payload, float x, float y, int pointer) Called when the payload is dropped on the target. The coordinates are in the target's local coordinate system. This is not called ifdrag(Source, Payload, float, float, int)
returned false. -
getActor
-