updateApplyButton( );
	public void widgetSelected( SelectionEvent e )	{		if ( e.getSource( ).equals( btnUseReportData ) )		{			// Skip when selection is false			if ( !btnUseReportData.getSelection( ) )			{				return;			}			try			{				switchDataSet( null );			}			catch ( ChartException e1 )			{				ChartWizard.displayException( e1 );			}			cmbDataSet.add( BLANK_DATASET, 0 );			cmbDataSet.select( 0 );			cmbDataSet.setEnabled( false );			btnNewData.setEnabled( false );			btnFilters.setEnabled( hasDataSet( )					&& getDataServiceProvider( ).isInvokingSupported( ) );			btnParameters.setEnabled( hasDataSet( )					&& getDataServiceProvider( ).isInvokingSupported( ) );			btnBinding.setEnabled( hasDataSet( )					&& getDataServiceProvider( ).isInvokingSupported( ) );		}		else if ( e.getSource( ).equals( btnUseDataSet ) )		{			// Skip when selection is false			if ( !btnUseDataSet.getSelection( ) )			{				return;			}			cmbDataSet.removeAll( );			cmbDataSet.add( BLANK_DATASET, 0 );			String[] dataSets = getDataServiceProvider( ).getAllDataSets( );			if ( dataSets != null )				for ( int i = 0; i < dataSets.length; i++ )				{					cmbDataSet.add( dataSets[i], i + 1 );				}			cmbDataSet.select( 0 );			cmbDataSet.setEnabled( true );			btnNewData.setEnabled( getDataServiceProvider( ).isInvokingSupported( ) );		}		else if ( e.getSource( ).equals( cmbDataSet ) )		{			try			{				ColorPalette.getInstance( ).restore( );				if ( !cmbDataSet.getText( ).equals( BLANK_DATASET ) )				{					int bCancel = switchDataSet( cmbDataSet.getText( ) );					if ( bCancel == Window.OK							&& cmbDataSet.getItem( 0 ).equals( BLANK_DATASET ) )					{						cmbDataSet.remove( BLANK_DATASET );					}					else if ( bCancel == Window.CANCEL )					{						String[] datasetNames = cmbDataSet.getItems( );						for ( int i = 0; i < datasetNames.length; i++ )						{							if ( datasetNames[i].equals( getDataServiceProvider( ).getBoundDataSet( ) ) )							{								cmbDataSet.select( i );								if ( cmbDataSet.getItem( 0 )										.equals( BLANK_DATASET ) )								{									cmbDataSet.remove( BLANK_DATASET );								}								return;							}						}						cmbDataSet.select( 0 );					}				}			}			catch ( ChartException e1 )			{				ChartWizard.displayException( e1 );			}			btnNewData.setEnabled( getDataServiceProvider( ).isInvokingSupported( ) );			btnFilters.setEnabled( hasDataSet( )					&& getDataServiceProvider( ).isInvokingSupported( ) );			btnParameters.setEnabled( hasDataSet( )					&& getDataServiceProvider( ).isInvokingSupported( ) );			btnBinding.setEnabled( hasDataSet( )					&& getDataServiceProvider( ).isInvokingSupported( ) );		}		else if ( e.getSource( ).equals( btnNewData ) )		{			// Bring up the dialog to create a dataset			int result = getDataServiceProvider( ).invoke( IDataServiceProvider.COMMAND_NEW_DATASET );			if ( result == Window.CANCEL )			{				return;			}			String[] sAllDS = getDataServiceProvider( ).getAllDataSets( );			String currentDataSet = cmbDataSet.getText( );			int dataSetCount = cmbDataSet.getItemCount( );			if ( currentDataSet.equals( BLANK_DATASET ) )			{				dataSetCount = dataSetCount - 1;			}			if ( sAllDS.length == dataSetCount )			{				return;			}			if ( currentDataSet.equals( BLANK_DATASET ) )			{				cmbDataSet.removeAll( );				cmbDataSet.add( BLANK_DATASET, 0 );				for ( int i = 0; i < sAllDS.length; i++ )				{					cmbDataSet.add( sAllDS[i], i + 1 );				}			}			else			{				cmbDataSet.setItems( sAllDS );			}			cmbDataSet.setText( currentDataSet );		}		else if ( e.getSource( ).equals( btnFilters ) )		{			if ( getDataServiceProvider( ).invoke( IDataServiceProvider.COMMAND_EDIT_FILTER ) == Window.OK )			{				refreshTablePreview( );				doLivePreview( );			}		}		else if ( e.getSource( ).equals( btnParameters ) )		{			if ( getDataServiceProvider( ).invoke( IDataServiceProvider.COMMAND_EDIT_PARAMETER ) == Window.OK )			{				refreshTablePreview( );				doLivePreview( );			}		}		else if ( e.getSource( ).equals( btnBinding ) )		{			if ( getDataServiceProvider( ).invoke( IDataServiceProvider.COMMAND_EDIT_BINDING ) == Window.OK )			{				refreshTablePreview( );				doLivePreview( );			}		}		else if ( e.getSource( ) instanceof MenuItem )		{			MenuItem item = (MenuItem) e.getSource( );			IAction action = (IAction) item.getData( );			action.setChecked( !action.isChecked( ) );			action.run( );		}	}