if ( vSeriesDefns != null ) { int size = elPaletteEntries1.size( ); int index1 = iIndex1; int index2 = iIndex2; for ( int i = 0; i < vSeriesDefns.length; i++ ) { if ( ( iIndex1 - i ) >= 0 ) { index1 = iIndex1 - i; } else { index1 = size - i + iIndex1; }  if ( ( iIndex2 - i ) >= 0 ) { index2 = iIndex2 - i; } else { index2 = size - i + iIndex2; }  EList el = vSeriesDefns[i].getSeriesPalette( ).getEntries( ); final Object o3 = el.get( index1 ); final Object o4 = el.get( index2 );  if ( index1 < index2 ) { el.remove( index2 ); el.remove( index1 ); el.add( index1, o4 ); el.add( index2, o3 ); } else { el.remove( index1 ); el.remove( index2 ); el.add( index2, o3 ); el.add( index1, o4 ); } } }
	private final void swap( int iIndex1, int iIndex2 )	{		final Object o1 = elPaletteEntries.get( iIndex1 );		final Object o2 = elPaletteEntries.get( iIndex2 );		int iSmaller = Math.min( iIndex1, iIndex2 );		elPaletteEntries.remove( iSmaller );		elPaletteEntries.remove( iSmaller );		if ( iIndex1 < iIndex2 )		{			elPaletteEntries.add( iSmaller, o1 );			elPaletteEntries.add( iSmaller, o2 );		}		else		{			elPaletteEntries.add( iSmaller, o2 );			elPaletteEntries.add( iSmaller, o1 );		}		if ( iSelectedIndex == iIndex1 )		{			iSelectedIndex = iIndex2;		}		else if ( iSelectedIndex == iIndex2 )		{			iSelectedIndex = iIndex1;		}		scrollToView( iSelectedIndex );		coPaletteEntries.redraw( );	}