protected void paintCellSelection( Graphics g, int row, int x, int y, int width, int height ) {
		float arcTopLeft, arcTopRight, arcBottomLeft, arcBottomRight;
		arcTopLeft = arcTopRight = arcBottomLeft = arcBottomRight = UIScale.scale( selectionArc / 2f );

		if( list.getLayoutOrientation() == JList.VERTICAL ) {
			// layout orientation: VERTICAL
			if( useUnitedRoundedSelection( true, false ) ) {
				if( row > 0 && list.isSelectedIndex( row - 1 ) )
					arcTopLeft = arcTopRight = 0;
				if( row < list.getModel().getSize() - 1 && list.isSelectedIndex( row + 1 ) )
					arcBottomLeft = arcBottomRight = 0;
			}
		} else {
			// layout orientation: VERTICAL_WRAP or HORIZONTAL_WRAP
			Rectangle r = null;
			if( useUnitedRoundedSelection( true, false ) ) {
				// vertical: check whether cells above or below are selected
				r = getCellBounds( list, row, row );

				int topIndex = locationToIndex( list, new Point( r.x, r.y - 1 ) );
				int bottomIndex = locationToIndex( list, new Point( r.x, r.y + r.height ) );

				if( topIndex >= 0 && topIndex != row && list.isSelectedIndex( topIndex ) )
					arcTopLeft = arcTopRight = 0;
				if( bottomIndex >= 0 && bottomIndex != row && list.isSelectedIndex( bottomIndex ) )
					arcBottomLeft = arcBottomRight = 0;
			}

			if( useUnitedRoundedSelection( false, true ) ) {
				// horizontal: check whether cells left or right are selected
				if( r == null )
					r = getCellBounds( list, row, row );

				int leftIndex = locationToIndex( list, new Point( r.x - 1, r.y ) );
				int rightIndex = locationToIndex( list, new Point( r.x + r.width, r.y ) );

				// special handling for the case that last column contains fewer cells than the other columns
				boolean ltr = list.getComponentOrientation().isLeftToRight();
				if( !ltr && leftIndex >= 0 && leftIndex != row && leftIndex == locationToIndex( list, new Point( r.x - 1, r.y - 1 ) ) )
					leftIndex = -1;
				if( ltr && rightIndex >= 0 && rightIndex != row && rightIndex == locationToIndex( list, new Point( r.x + r.width, r.y - 1 ) ) )
					rightIndex = -1;

				if( leftIndex >= 0 && leftIndex != row && list.isSelectedIndex( leftIndex ) )
					arcTopLeft = arcBottomLeft = 0;
				if( rightIndex >= 0 && rightIndex != row && list.isSelectedIndex( rightIndex ) )
					arcTopRight = arcBottomRight = 0;
			}
		}

		FlatUIUtils.paintSelection( (Graphics2D) g, x, y, width, height,
			UIScale.scale( selectionInsets ), arcTopLeft, arcTopRight, arcBottomLeft, arcBottomRight, 0 );
	}
Paints (rounded) cell selection.
Supports {@link #selectionArc} and {@link #selectionInsets}.
<p>
<b>Note:</b> This method is only invoked if either selection arc
             is greater than zero or if selection insets are not empty.

@since 3
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatListUI.java