ChartAdapter.changeChartWithoutNotification( new IChangeWithoutNotification( ) {  public Object run( ) { String currentDimension = ChartUIUtil.getDimensionString( getChart( ).getDimension( ) ); boolean isDimensionSupported = wizardContext.getChartType( ) .isDimensionSupported( currentDimension, cmbAxisSelect.getItemCount( ), 0 ); if ( !isDimensionSupported ) { WizardBase.displayException( new RuntimeException( currentDimension + Messages.getString( "DataDefinitionSelector.Exception.NotSupportedForMultipleAxes" ) ) ); getChart( ).setDimension( ChartUIUtil.getDimensionType( wizardContext.getChartType( ) .getDefaultDimension( ) ) ); } return null; } } );
	public void widgetSelected( SelectionEvent e )	{		if ( e.widget.equals( btnSeriesDelete ) )		{			// Update color registry			updateColorRegistry( cmbSeriesSelect.getSelectionIndex( ) );			// Remove sample data and series			removeSeriesDefinition( );			setSeriesDeleteEnabled( );			int oldSelectedIndex = cmbSeriesSelect.getSelectionIndex( );			refreshSeriesCombo( );			// Selects the new item or last item			if ( oldSelectedIndex > cmbSeriesSelect.getItemCount( ) - 2 )			{				oldSelectedIndex = cmbSeriesSelect.getItemCount( ) - 2;			}			cmbSeriesSelect.select( oldSelectedIndex );			// Update data definition component and refresh query in it			updateDataDefinition( );			refreshQuery( );			// Sets current series index and update bottom component if needed			setSelectedSeriesIndex( );			// CHART ENGINE NOT SUPPORT MULTI-GROUPING, NO NEED TO REFRESH UI			// selectDataUI.refreshRightBindingArea( );			selectDataUI.layoutAll( );		}		else if ( e.widget.equals( cmbSeriesSelect ) )		{			// Check if needing to add a new series			if ( cmbSeriesSelect.getSelectionIndex( ) == cmbSeriesSelect.getItemCount( ) - 1 )			{				addNewSeriesDefinition( );				setSeriesDeleteEnabled( );				refreshSeriesCombo( );				// Selects the new item				cmbSeriesSelect.select( cmbSeriesSelect.getItemCount( ) - 2 );			}			// Update data definition component and refresh query in it			updateDataDefinition( );			refreshQuery( );			// Sets current series index and update bottom component if needed			setSelectedSeriesIndex( );			// CHART ENGINE NOT SUPPORT MULTI-GROUPING, NO NEED TO REFRESH UI			// selectDataUI.refreshRightBindingArea( );			selectDataUI.layoutAll( );		}		else if ( e.widget.equals( cmbAxisSelect ) )		{			// Check if needing to add a new series			if ( cmbAxisSelect.getSelectionIndex( ) == cmbAxisSelect.getItemCount( ) - 1 )			{				// Update model				ChartUIUtil.addAxis( (ChartWithAxes) getChart( ) );				// Update UI				setAxisDeleteEnabled( );				refreshAxisCombo( );				cmbAxisSelect.select( cmbAxisSelect.getItemCount( ) - 2 );			}			axisIndex = cmbAxisSelect.getSelectionIndex( );			updateAllSeriesUnderAxis( );		}		else if ( e.widget.equals( btnAxisDelete ) )		{			// Update color registry			updateColorRegistry( -1 );			// Update model			ChartUIUtil.removeAxis( getChart( ), axisIndex );			// Update UI			setAxisDeleteEnabled( );			refreshAxisCombo( );			// Selects the new item or last item			if ( axisIndex > cmbAxisSelect.getItemCount( ) - 2 )			{				axisIndex = cmbAxisSelect.getItemCount( ) - 2;			}			cmbAxisSelect.select( axisIndex );			updateAllSeriesUnderAxis( );		}	}