示例#1
0
 /**
  * @param group will replace the internally managed group. All current children will be moved to
  *     this group.
  */
 @Override
 public void setActor(final WidgetGroup group) {
   if (group == null) {
     throw new IllegalArgumentException("Group cannot be null.");
   }
   final Group previousGroup = getActor();
   super.setActor(group);
   attachListener(); // Attaches draggable to all previous group children.
   for (final Actor child : previousGroup.getChildren()) {
     group.addActor(child); // No need to attach draggable, child was already in pane.
   }
 }
示例#2
0
 /** @param draggable will be automatically added to all children. */
 public void setDraggable(final Draggable draggable) {
   removeListener();
   this.draggable = draggable;
   attachListener();
 }