popups.add( new SeriesPaletteSheet( Messages.getString( "SeriesXSheetImpl.Label.SeriesPalette" ),
popups.add( new SeriesPaletteSheet( Messages.getString( "SeriesSheetImpl.Label.SeriesPalette" ),
	public void createControl( Composite parent )	{		ChartUIUtil.bindHelp( parent, ChartHelpContextIds.SUBTASK_SERIES );		final int COLUMN_CONTENT = 4;		cmpContent = new Composite( parent, SWT.NONE ) {			public Point computeSize( int wHint, int hHint, boolean changed )			{				// Return a fixed height as preferred size of scrolled composite				Point p = super.computeSize( wHint, hHint, changed );				p.y = 200;				return p;			}		};		{			GridLayout glContent = new GridLayout( COLUMN_CONTENT, false );			glContent.horizontalSpacing = 10;			cmpContent.setLayout( glContent );			GridData gd = new GridData( GridData.FILL_BOTH );			cmpContent.setLayoutData( gd );		}		new Label( cmpContent, SWT.NONE ).setText( Messages.getString( "ChartSheetImpl.Label.ColorBy" ) ); //$NON-NLS-1$		cmbColorBy = new Combo( cmpContent, SWT.DROP_DOWN | SWT.READ_ONLY );		{			GridData gridData = new GridData( );			gridData.horizontalSpan = COLUMN_CONTENT - 1;			cmbColorBy.setLayoutData( gridData );			NameSet ns = LiteralHelper.legendItemTypeSet;			cmbColorBy.setItems( ns.getDisplayNames( ) );			cmbColorBy.select( ns.getSafeNameIndex( getChart( ).getLegend( )					.getItemType( )					.getName( ) ) );			cmbColorBy.addSelectionListener( this );		}		final int COLUMN_DETAIL = 6;		ScrolledComposite cmpScroll = new ScrolledComposite( cmpContent,				SWT.V_SCROLL );		{			GridData gd = new GridData( GridData.FILL_BOTH );			gd.horizontalSpan = COLUMN_CONTENT;			cmpScroll.setLayoutData( gd );			cmpScroll.setMinHeight( ( ChartUIUtil.getAllOrthogonalSeriesDefinitions( getChart( ) )					.size( ) + 1 ) * 24 + 40 );			cmpScroll.setExpandVertical( true );			cmpScroll.setExpandHorizontal( true );		}		Composite cmpList = new Composite( cmpScroll, SWT.NONE );		{			GridLayout glContent = new GridLayout( COLUMN_DETAIL, false );			glContent.horizontalSpacing = 10;			cmpList.setLayout( glContent );			cmpScroll.setContent( cmpList );		}		Label lblSeries = new Label( cmpList, SWT.NONE );		{			GridData gd = new GridData( );			gd.horizontalAlignment = SWT.CENTER;			lblSeries.setLayoutData( gd );			lblSeries.setFont( JFaceResources.getBannerFont( ) );			lblSeries.setText( Messages.getString( "SeriesSheetImpl.Label.Series" ) ); //$NON-NLS-1$		}		Label lblTitle = new Label( cmpList, SWT.NONE );		{			GridData gd = new GridData( );			gd.horizontalAlignment = SWT.CENTER;			lblTitle.setLayoutData( gd );			lblTitle.setFont( JFaceResources.getBannerFont( ) );			lblTitle.setText( Messages.getString( "SeriesSheetImpl.Label.Title" ) ); //$NON-NLS-1$		}		Label lblType = new Label( cmpList, SWT.NONE );		{			GridData gd = new GridData( );			gd.horizontalAlignment = SWT.CENTER;			lblType.setLayoutData( gd );			lblType.setFont( JFaceResources.getBannerFont( ) );			lblType.setText( Messages.getString( "SeriesSheetImpl.Label.Type" ) ); //$NON-NLS-1$		}		Label lblVisible = new Label( cmpList, SWT.NONE );		{			GridData gd = new GridData( );			gd.horizontalAlignment = SWT.CENTER;			lblVisible.setLayoutData( gd );			lblVisible.setFont( JFaceResources.getBannerFont( ) );			lblVisible.setText( Messages.getString( "SeriesSheetImpl.Label.Visible" ) ); //$NON-NLS-1$		}		Label lblStack = new Label( cmpList, SWT.NONE );		{			GridData gd = new GridData( );			gd.horizontalAlignment = SWT.CENTER;			lblStack.setLayoutData( gd );			lblStack.setFont( JFaceResources.getBannerFont( ) );			lblStack.setText( Messages.getString( "SeriesSheetImpl.Label.Stacked" ) ); //$NON-NLS-1$		}		Label lblTranslucent = new Label( cmpList, SWT.NONE );		{			GridData gd = new GridData( );			gd.horizontalAlignment = SWT.CENTER;			lblTranslucent.setLayoutData( gd );			lblTranslucent.setFont( JFaceResources.getBannerFont( ) );			lblTranslucent.setText( Messages.getString( "SeriesSheetImpl.Label.Translucent" ) ); //$NON-NLS-1$		}		List seriesDefns = ChartUIUtil.getBaseSeriesDefinitions( getChart( ) );		int treeIndex = 0;		for ( int i = 0; i < seriesDefns.size( ); i++ )		{			new SeriesOptionChoser( ( (SeriesDefinition) seriesDefns.get( i ) ),					getChart( ) instanceof ChartWithAxes ? Messages.getString( "SeriesSheetImpl.Label.CategoryXSeries" ) : Messages.getString( "SeriesSheetImpl.Label.CategoryBaseSeries" ), //$NON-NLS-1$ //$NON-NLS-2$					i,					treeIndex++ ).placeComponents( cmpList );		}		seriesDefns = ChartUIUtil.getAllOrthogonalSeriesDefinitions( getChart( ) );		for ( int i = 0; i < seriesDefns.size( ); i++ )		{			String text = getChart( ) instanceof ChartWithAxes ? Messages.getString( "SeriesSheetImpl.Label.ValueYSeries" ) : Messages.getString( "SeriesSheetImpl.Label.ValueOrthogonalSeries" ); //$NON-NLS-1$ //$NON-NLS-2$			new SeriesOptionChoser( ( (SeriesDefinition) seriesDefns.get( i ) ),					( seriesDefns.size( ) == 1 ? text							: ( text + " - " + ( i + 1 ) ) ), i, treeIndex++ ).placeComponents( cmpList ); //$NON-NLS-1$		}		cmp = new Composite( cmpContent, SWT.NONE );		{			GridData gd = new GridData( GridData.VERTICAL_ALIGN_BEGINNING					| GridData.FILL_HORIZONTAL );			gd.horizontalSpan = COLUMN_CONTENT;			cmp.setLayoutData( gd );			sl = new StackLayout( );			cmp.setLayout( sl );		}		cmpCategory = new Composite( cmp, SWT.NONE );		{			cmpCategory.setLayout( new GridLayout( 6, false ) );			cmpCategory.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );		}		popup = new SeriesPaletteSheet( Messages.getString( "SeriesXSheetImpl.Label.SeriesPalette" ), //$NON-NLS-1$				getContext( ),				getCategorySeriesDefinition( ) );		Button btnSeriesPals = createToggleButton( cmpCategory,				Messages.getString( "SeriesXSheetImpl.Label.SeriesPalette&" ), //$NON-NLS-1$				popup );		btnSeriesPals.addSelectionListener( this );		cmpValue = new Composite( cmp, SWT.NONE );		{			cmpValue.setLayout( new GridLayout( 6, false ) );			cmpValue.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );		}		for ( int i = 0; i < getChart( ).getSeriesForLegend( ).length; i++ )		{			popups.add( new SeriesPaletteSheet( Messages.getString( "SeriesXSheetImpl.Label.SeriesPalette" ), //$NON-NLS-1$					getContext( ),					getValueSeriesDefinition( i ) ) );			Button btnSeriesPal = createToggleButton( cmpValue,					Messages.getString( "SeriesXSheetImpl.Label.SeriesPalette&" ) + ( i + 1 ), //$NON-NLS-1$					(ITaskPopupSheet) popups.get( i ) );			btnSeriesPal.addSelectionListener( this );		}		NameSet ns = LiteralHelper.legendItemTypeSet;		if ( cmbColorBy.getText( )				.equals( ns.getDisplayNameByName( LegendItemType.CATEGORIES_LITERAL.getName( ) ) ) )		{			sl.topControl = cmpCategory;		}		else		{			sl.topControl = cmpValue;		}	}