| Modifier and Type | Class and Description |
|---|---|
| public static class | DragAndDrop.
The payload of a drag and drop operation. |
| public abstract static class | DragAndDrop.
A source where a payload can be dragged from. |
| public abstract static class | DragAndDrop.
A target where a payload can be dropped to. |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv int | |
| private int | |
| pack-priv boolean | |
| pack-priv Actor | |
| pack-priv float | |
| pack-priv float | |
| pack-priv DragAndDrop. | |
| pack-priv int | |
| pack-priv long | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv DragAndDrop. | |
| pack-priv boolean | |
| pack-priv final ObjectMap | |
| private float | |
| pack-priv DragAndDrop. | |
| pack-priv final Array | |
| pack-priv static final Vector2 | |
| pack-priv float | |
| pack-priv float |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void | cancelTouchFocusExcept(DragAndDrop.
Cancels the touch focus for everything except the specified source. |
| public void | |
| public Actor | |
| public DragAndDrop. | |
| public DragAndDrop. | |
| public int | |
| public boolean | |
| public boolean | isDragValid()
Returns true if a drag is in progress and the |
| public void | |
| public void | |
| public void | |
| public void | setCancelTouchFocus(boolean cancelTouchFocus)
When true (default), the |
| public void | |
| public void | setDragTime(int dragMillis)
Time in milliseconds that a drag must take before a drop will be considered valid. |
| public void | |
| public void | setTapSquareSize(float halfTapSquareSize)
Sets the distance a touch must travel before being considered a drag. |
| public void | setTouchOffset(float touchOffsetX, float touchOffsetY)
Sets an offset in stage coordinates from the touch position which is used to determine the drop location. |
| activePointer | back to summary |
|---|---|
| pack-priv int activePointer | |
| button | back to summary |
|---|---|
| private int button | |
| cancelTouchFocus | back to summary |
|---|---|
| pack-priv boolean cancelTouchFocus | |
| dragActor | back to summary |
|---|---|
| pack-priv Actor dragActor | |
| dragActorX | back to summary |
|---|---|
| pack-priv float dragActorX | |
| dragActorY | back to summary |
|---|---|
| pack-priv float dragActorY | |
| dragSource | back to summary |
|---|---|
| pack-priv DragAndDrop. | |
| dragTime | back to summary |
|---|---|
| pack-priv int dragTime | |
| dragValidTime | back to summary |
|---|---|
| pack-priv long dragValidTime | |
| isValidTarget | back to summary |
|---|---|
| pack-priv boolean isValidTarget | |
| keepWithinStage | back to summary |
|---|---|
| pack-priv boolean keepWithinStage | |
| payload | back to summary |
|---|---|
| pack-priv DragAndDrop. | |
| removeDragActor | back to summary |
|---|---|
| pack-priv boolean removeDragActor | |
| sourceListeners | back to summary |
|---|---|
| pack-priv final ObjectMap<DragAndDrop. | |
| tapSquareSize | back to summary |
|---|---|
| private float tapSquareSize | |
| target | back to summary |
|---|---|
| pack-priv DragAndDrop. | |
| targets | back to summary |
|---|---|
| pack-priv final Array<DragAndDrop. | |
| tmpVector | back to summary |
|---|---|
| pack-priv static final Vector2 tmpVector | |
| touchOffsetX | back to summary |
|---|---|
| pack-priv float touchOffsetX | |
| touchOffsetY | back to summary |
|---|---|
| pack-priv float touchOffsetY | |
| DragAndDrop | back to summary |
|---|---|
| public DragAndDrop() | |
| addSource | back to summary |
|---|---|
| public void addSource(final DragAndDrop. | |
| addTarget | back to summary |
|---|---|
| public void addTarget(DragAndDrop. | |
| cancelTouchFocusExcept | back to summary |
|---|---|
| public void cancelTouchFocusExcept(DragAndDrop. Cancels the touch focus for everything except the specified source. | |
| clear | back to summary |
|---|---|
| public void clear() Removes all targets and sources. | |
| getDragActor | back to summary |
|---|---|
| public Actor getDragActor() Returns the current drag actor, or null.
| |
| getDragPayload | back to summary |
|---|---|
| public DragAndDrop. Returns the current drag payload, or null.
| |
| getDragSource | back to summary |
|---|---|
| public DragAndDrop. Returns the current drag source, or null.
| |
| getDragTime | back to summary |
|---|---|
| public int getDragTime() | |
| isDragging | back to summary |
|---|---|
| public boolean isDragging() | |
| isDragValid | back to summary |
|---|---|
| public boolean isDragValid() Returns true if a drag is in progress and the | |
| removeSource | back to summary |
|---|---|
| public void removeSource(DragAndDrop. | |
| removeTarget | back to summary |
|---|---|
| public void removeTarget(DragAndDrop. | |
| setButton | back to summary |
|---|---|
| public void setButton(int button) Sets the button to listen for, all other buttons are ignored. Default is | |
| setCancelTouchFocus | back to summary |
|---|---|
| public void setCancelTouchFocus(boolean cancelTouchFocus) When true (default), the | |
| setDragActorPosition | back to summary |
|---|---|
| public void setDragActorPosition(float dragActorX, float dragActorY) | |
| setDragTime | back to summary |
|---|---|
| public void setDragTime(int dragMillis) Time in milliseconds that a drag must take before a drop will be considered valid. This ignores an accidental drag and drop that was meant to be a click. Default is 250. | |
| setKeepWithinStage | back to summary |
|---|---|
| public void setKeepWithinStage(boolean keepWithinStage) | |
| setTapSquareSize | back to summary |
|---|---|
| public void setTapSquareSize(float halfTapSquareSize) Sets the distance a touch must travel before being considered a drag. | |
| setTouchOffset | back to summary |
|---|---|
| public void setTouchOffset(float touchOffsetX, float touchOffsetY) Sets an offset in stage coordinates from the touch position which is used to determine the drop location. Default is 0,0. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Actor | |
| pack-priv Actor | |
| pack-priv Object | |
| pack-priv Actor |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Actor | |
| public Actor | |
| public Object | |
| public Actor | |
| public void | |
| public void | |
| public void | |
| public void |
| dragActor | back to summary |
|---|---|
| pack-priv Actor dragActor
| |
| invalidDragActor | back to summary |
|---|---|
| pack-priv Actor invalidDragActor
| |
| object | back to summary |
|---|---|
| pack-priv Object object
| |
| validDragActor | back to summary |
|---|---|
| pack-priv Actor validDragActor
| |
| Payload | back to summary |
|---|---|
| public Payload() | |
| getDragActor | back to summary |
|---|---|
public Actor getDragActor()
| |
| getInvalidDragActor | back to summary |
|---|---|
public Actor getInvalidDragActor()
| |
| getObject | back to summary |
|---|---|
public Object getObject()
| |
| getValidDragActor | back to summary |
|---|---|
public Actor getValidDragActor()
| |
| setDragActor | back to summary |
|---|---|
| public void setDragActor(Actor dragActor) | |
| setInvalidDragActor | back to summary |
|---|---|
| public void setInvalidDragActor(Actor invalidDragActor) | |
| setObject | back to summary |
|---|---|
| public void setObject(Object object) | |
| setValidDragActor | back to summary |
|---|---|
| public void setValidDragActor(Actor validDragActor) | |
| Modifier and Type | Method and Description |
|---|---|
| public void | drag(InputEvent event, float x, float y, int pointer)
Called repeatedly during a drag which started on this source. |
| public abstract DragAndDrop. | Returns: If null the drag will not affect any targets.Called when a drag is started on the source. |
| public void | dragStop(InputEvent event, float x, float y, int pointer, DragAndDrop.
null if dragStart returned null. payload,null if not dropped on a valid target. targetCalled when a drag for the source is stopped. |
| public Actor |
| actor | back to summary |
|---|---|
| pack-priv final Actor actor | |
| Source | back to summary |
|---|---|
| public Source(Actor actor) | |
| drag | back to summary |
|---|---|
| public void drag(InputEvent event, float x, float y, int pointer) Called repeatedly during a drag which started on this source. | |
| dragStart | back to summary |
|---|---|
| public abstract DragAndDrop. Called when a drag is started on the source. The coordinates are in the source's local coordinate system.
| |
| dragStop | back to summary |
|---|---|
| public void dragStop(InputEvent event, float x, float y, int pointer, DragAndDrop. Called when a drag for the source is stopped. The coordinates are in the source's local coordinate system.
| |
| getActor | back to summary |
|---|---|
| public Actor getActor() | |
| Modifier and Type | Method and Description |
|---|---|
| public abstract boolean | Returns: true if this is a valid target for the payload.Called when the payload is dragged over the target. |
| public abstract void | drop(DragAndDrop.
Called when the payload is dropped on the target. |
| public Actor | |
| public void | reset(DragAndDrop.
Called when the payload is no longer over the target, whether because the touch was moved or a drop occurred. |
| actor | back to summary |
|---|---|
| pack-priv final Actor actor | |
| Target | back to summary |
|---|---|
| public Target(Actor actor) | |
| drag | back to summary |
|---|---|
| public abstract boolean drag(DragAndDrop. Called when the payload is dragged over the target. The coordinates are in the target's local coordinate system.
| |
| drop | back to summary |
|---|---|
| public abstract void drop(DragAndDrop. Called when the payload is dropped on the target. The coordinates are in the target's local coordinate system. This is
not called if | |
| getActor | back to summary |
|---|---|
| public Actor getActor() | |
| reset | back to summary |
|---|---|
| public void reset(DragAndDrop. Called when the payload is no longer over the target, whether because the touch was moved or a drop occurred. This is
called even if | |