question: @ Override protected void copyItem ( Positionable p ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "Enter copyItem: _selectionGroup {}" , _selectionGroup != null ? "size=" + _selectionGroup . size ( ) : "null" ) ; } if ( _pastePending ) { pasteItems ( ) ; } if ( _selectionGroup != null && ! _selectionGroup . contains ( p ) ) { deselectSelectionGroup ( ) ; } if ( _selectionGroup == null ) { _selectionGroup = new ArrayList < Positionable > ( ) ; _selectionGroup . add ( p ) ; } ArrayList < Positionable > selectionGroup = new ArrayList < Positionable > ( ) ; for ( Positionable comp : _selectionGroup ) { Positionable pos = comp . deepClone ( ) ; selectionGroup . add ( pos ) ; } _selectionGroup = selectionGroup ; _pastePending = true ; }
target:  Set up selections for a paste. Note a copy of _selectionGroup is made that is NOT in the _contents. This disconnected ArrayList is added to the _contents when (if) a paste is made. The disconnected _selectionGroup can be dragged to a new location.