selectAllButtons( false ); ( (Button) e.widget ).setSelection( true ); }  if ( e.widget.equals( btnLabel ) ) { popupShell = createPopupShell( ); popupSheet = new SeriesLabelSheet( popupShell, getContext( ), getSeriesDefinitionForProcessing( ) ); getWizard( ).attachPopup( btnLabel.getText( ), -1, -1 ); } else if ( e.widget.equals( btnDialRegion ) ) { popupShell = createPopupShell( ); popupSheet = new SeriesRegionSheet( popupShell, getContext( ), getSeriesDefinitionForProcessing( ) ); getWizard( ).attachPopup( btnDialRegion.getText( ), -1, -1 ); } else if ( e.widget.equals( btnDialLabel ) ) { popupShell = createPopupShell( ); popupSheet = new DialLabelSheet( popupShell, getContext( ), getSeriesDefinitionForProcessing( ) ); getWizard( ).attachPopup( btnDialLabel.getText( ), -1, -1 ); } else if ( e.widget.equals( btnPieTitle ) ) { popupShell = createPopupShell( ); popupSheet = new PieTitleSheet( popupShell, getContext( ), getSeriesDefinitionForProcessing( ) ); getWizard( ).attachPopup( btnPieTitle.getText( ), -1, -1 ); } else if ( e.widget.equals( btnInteractivity ) ) { popupShell = createPopupShell( ); popupSheet = new InteractivitySheet( popupShell, getContext( ), getSeriesDefinitionForProcessing( ).getDesignTimeSeries( ) .getTriggers( ), true, false ); getWizard( ).attachPopup( btnInteractivity.getText( ), -1, -1 ); } else if ( e.widget.equals( btnTrendline ) ) { popupShell = createPopupShell( ); popupSheet = new SeriesTrendlineSheet( popupShell, getContext( ), getSeriesDefinitionForProcessing( ) ); getWizard( ).attachPopup( btnTrendline.getText( ), -1, -1 ); } else if ( e.widget.equals( btnPalette ) ) { popupShell = createPopupShell( ); popupSheet = new SeriesPaletteSheet( popupShell, getContext( ), getSeriesDefinitionForProcessing( ) ); getWizard( ).attachPopup( btnPalette.getText( ), -1, -1 ); } else if ( e.widget.equals( btnLineMarker ) ) { Series series = getSeriesDefinitionForProcessing( ).getDesignTimeSeries( ); assert series instanceof LineSeries; popupShell = createPopupShell( ); popupSheet = new LineSeriesMarkerSheet( popupShell, getContext( ), (LineSeries) series ); getWizard( ).attachPopup( btnLineMarker.getText( ), -1, -1 );
attachPopup( ( (Button) e.widget ).getText( ) );
	public void widgetSelected( SelectionEvent e )	{		// detach popup dialogue		if ( detachPopup( e.widget ) )		{			return;		}		if ( e.widget instanceof Button				&& ( ( (Button) e.widget ).getStyle( ) & SWT.TOGGLE ) == SWT.TOGGLE				&& ( (Button) e.widget ).getSelection( ) )		{			selectAllButtons( false );			( (Button) e.widget ).setSelection( true );		}		if ( e.widget.equals( btnLabel ) )		{			popupShell = createPopupShell( );			popupSheet = new SeriesLabelSheet( popupShell,					getContext( ),					getSeriesDefinitionForProcessing( ) );			getWizard( ).attachPopup( btnLabel.getText( ), -1, -1 );		}		else if ( e.widget.equals( btnDialRegion ) )		{			popupShell = createPopupShell( );			popupSheet = new SeriesRegionSheet( popupShell,					getContext( ),					getSeriesDefinitionForProcessing( ) );			getWizard( ).attachPopup( btnDialRegion.getText( ), -1, -1 );		}		else if ( e.widget.equals( btnDialLabel ) )		{			popupShell = createPopupShell( );			popupSheet = new DialLabelSheet( popupShell,					getContext( ),					getSeriesDefinitionForProcessing( ) );			getWizard( ).attachPopup( btnDialLabel.getText( ), -1, -1 );		}		else if ( e.widget.equals( btnPieTitle ) )		{			popupShell = createPopupShell( );			popupSheet = new PieTitleSheet( popupShell,					getContext( ),					getSeriesDefinitionForProcessing( ) );			getWizard( ).attachPopup( btnPieTitle.getText( ), -1, -1 );		}		else if ( e.widget.equals( btnInteractivity ) )		{			popupShell = createPopupShell( );			popupSheet = new InteractivitySheet( popupShell,					getContext( ),					getSeriesDefinitionForProcessing( ).getDesignTimeSeries( )							.getTriggers( ),					true,					false );			getWizard( ).attachPopup( btnInteractivity.getText( ), -1, -1 );		}		else if ( e.widget.equals( btnTrendline ) )		{			popupShell = createPopupShell( );			popupSheet = new SeriesTrendlineSheet( popupShell,					getContext( ),					getSeriesDefinitionForProcessing( ) );			getWizard( ).attachPopup( btnTrendline.getText( ), -1, -1 );		}		else if ( e.widget.equals( btnPalette ) )		{			popupShell = createPopupShell( );			popupSheet = new SeriesPaletteSheet( popupShell,					getContext( ),					getSeriesDefinitionForProcessing( ) );			getWizard( ).attachPopup( btnPalette.getText( ), -1, -1 );		}		else if ( e.widget.equals( btnLineMarker ) )		{			Series series = getSeriesDefinitionForProcessing( ).getDesignTimeSeries( );			assert series instanceof LineSeries;			popupShell = createPopupShell( );			popupSheet = new LineSeriesMarkerSheet( popupShell,					getContext( ),					(LineSeries) series );			getWizard( ).attachPopup( btnLineMarker.getText( ), -1, -1 );		}		if ( e.widget.equals( btnShowLine ) )		{			btnTrendline.setEnabled( btnShowLine.getSelection( ) );			if ( btnShowLine.getSelection( ) )			{				CurveFitting cf = CurveFittingImpl.create( );				cf.eAdapters( )						.addAll( getSeriesDefinitionForProcessing( ).getDesignTimeSeries( )								.eAdapters( ) );				getSeriesDefinitionForProcessing( ).getDesignTimeSeries( )						.setCurveFitting( cf );			}			else			{				getSeriesDefinitionForProcessing( ).getDesignTimeSeries( )						.setCurveFitting( null );				// Close trendline popup				if ( btnTrendline.getSelection( ) )				{					btnTrendline.setSelection( false );					detachPopup( btnTrendline );				}			}		}	}