The CommandHandler.memberValidation function only allows Nodes to be added to Groups of the same "color". The Group.mouseDrop event handler calls Group.addMembers to add dropped nodes to that group. If the add fails due the memberValidation predicate, the whole operation is cancelled and thus rolled-back.

The "Allow Top-Level Drops" checkbox controls whether or not the user may drop nodes onto the background of the diagram. That applies to both external drag-and-drops, from the Palette, and internal drag-and-drops starting within the diagram. The Diagram.mouseDrop event handler is similar to the Group.mouseDrop event handler, except that it calls CommandHandler.addTopLevelParts.

The Group.mouseDragEnter and Group.mouseDragLeave event handlers change the appearance of the group if it is OK to drop what the DraggingTool is dragging into that group. There is similar behavior for the diagram background for top-level drops, implemented by Diagram.mouseDragOver.

When there are zero members, the Group's Shape surrounding the Placeholder is a "Circle", otherwise it is a "RoundedRectangle".