Package com.prineside.tdi2.scene2d.utils
Class DragAndDrop.Source
java.lang.Object
com.prineside.tdi2.scene2d.utils.DragAndDrop.Source
- Enclosing class:
- DragAndDrop
A source where a payload can be dragged from.
- Author:
- Nathan Sweet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
drag
(InputEvent event, float x, float y, int pointer) Called repeatedly during a drag which started on this source.abstract DragAndDrop.Payload
dragStart
(InputEvent event, float x, float y, int pointer) Called when a drag is started on the source.void
dragStop
(InputEvent event, float x, float y, int pointer, DragAndDrop.Payload payload, DragAndDrop.Target target) Called when a drag for the source is stopped.getActor()
-
Constructor Details
-
Source
-
-
Method Details
-
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
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
-