Class DragAndDrop.Source
- java.lang.Object
-
- com.badlogic.gdx.scenes.scene2d.utils.DragAndDrop.Source
-
- Enclosing class:
- DragAndDrop
public abstract static class DragAndDrop.Source extends java.lang.ObjectA source where a payload can be dragged from.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddrag(InputEvent event, float x, float y, int pointer)Called repeatedly during a drag which started on this source.abstract DragAndDrop.PayloaddragStart(InputEvent event, float x, float y, int pointer)Called when a drag is started on the source.voiddragStop(InputEvent event, float x, float y, int pointer, DragAndDrop.Payload payload, DragAndDrop.Target target)Called when a drag for the source is stopped.ActorgetActor()
-
-
-
Constructor Detail
-
Source
public Source(Actor actor)
-
-
Method Detail
-
dragStart
@Null public abstract DragAndDrop.Payload dragStart(InputEvent event, float x, float y, int pointer)
Called when a drag is started on the source. The coordinates are in the source's local coordinate system.- Returns:
- If null the drag will not affect any targets.
-
drag
public void drag(InputEvent event, float x, float y, int pointer)
Called repeatedly during a drag which started on this source.
-
dragStop
public void dragStop(InputEvent event, float x, float y, int pointer, @Null DragAndDrop.Payload payload, @Null DragAndDrop.Target target)
Called when a drag for the source is stopped. The coordinates are in the source's local coordinate system.- Parameters:
payload- null if dragStart returned null.target- null if not dropped on a valid target.
-
getActor
public Actor getActor()
-
-