private void createPagingIndicator( Composite parent, Swipe swipe, int itemCount ) {
final PagingIndicator pagingIndicator = new PagingIndicator( parent );
pagingIndicator.setSpacing( 5 );
pagingIndicator.setCount( itemCount );
swipe.addSwipeListener( new SwipeAdapter() {
@Override
public void itemActivated(SwipeItem item, int index, SwipeContext context) {
pagingIndicator.setActive( index );
}
} );