Ejemplo n.º 1
0
 /**
  * @param draggable is attached to the actor.
  * @param actor is being dragged.
  * @param overActor is directly under the dragged actor.
  * @param dragPane contains the actor under dragged widget.
  * @return true if actor is accepted and added to the group.
  */
 protected boolean addActor(
     final Draggable draggable,
     final Actor actor,
     final Actor overActor,
     final DragPane dragPane) {
   final Actor directPaneChild = getActorInDragPane(overActor, dragPane);
   directPaneChild.stageToLocalCoordinates(DRAG_POSITION);
   if (dragPane.isVertical() || dragPane.isVerticalFlow()) {
     return addToVerticalGroup(actor, dragPane, directPaneChild);
   } else if (dragPane.isHorizontal() || dragPane.isHorizontalFlow()) {
     return addToHorizontalGroup(actor, dragPane, directPaneChild);
   } else if (dragPane.isFloating()) {
     return addToFloatingGroup(draggable, actor, dragPane);
   } // This is the default behavior for grid and unknown groups:
   return addToOtherGroup(actor, dragPane, directPaneChild);
 }