Class DragAndDrop.Source

java.lang.Object
com.prineside.tdi2.scene2d.utils.DragAndDrop.Source
Enclosing class:
DragAndDrop

public abstract static class DragAndDrop.Source extends Object
A source where a payload can be dragged from.
Author:
Nathan Sweet
  • Constructor Details

    • Source

      public Source(Actor actor)
  • 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

      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()