public AbstractConnection( DefaultUmlDiagram diagram, DefaultBox<?> sourceItem, ConnectionArray source, DefaultBox<?> targetItem, ConnectionArray target, ItemKey<Connection> key ) {
		super( diagram, key );

		setSourceItem( sourceItem );
		setTargetItem( targetItem );

		selection = new ConnectionSelectionCapability( this );
		addCapability( CapabilityName.SELECTABLE, selection );

		DefaultUmlConfiguration configuration = diagram.getRepository().getConfiguration();
		
		line = createLine( configuration );
		selectionBorder = new PathedGraphConnectionSelectionBorder( line, getSelectionStroke( configuration ) );
		
		addChild( selectionBorder );
		addChild( line );
		
		if( source != null ) {
			source.add( line.getSourceEndPoint() );
		}
		if( target != null ) {
			target.add( line.getTargetEndPoint() );
		}
	}