cdNew.setTransparency( ( bTransparencyChanged )
cdNew.setTransparency( bTransparencyChanged
	public void widgetSelected( SelectionEvent e )	{		Object oSource = e.getSource( );		if ( oSource.equals( btnDown ) )		{			fireHandleEvent( MOUSE_CLICKED_EVENT );			toggleDropDown( );		}		else if ( oSource.equals( this.btnImage ) )		{			ImageDialog idlg = new ImageDialog( this.getShell( ), fCurrent );			cmpDropDown.getParent( ).dispose( );			if ( idlg.open( ) == Window.OK )			{				Fill imgFill = idlg.getResult( );				if ( imgFill != null )				{					addAdapters( imgFill );					this.setFill( imgFill );					fireHandleEvent( FillChooserComposite.FILL_CHANGED_EVENT );				}			}		}		else if ( oSource.equals( this.btnReset ) )		{			this.setFill( null );			fireHandleEvent( FillChooserComposite.FILL_CHANGED_EVENT );			cmpDropDown.getShell( ).dispose( );		}		else if ( oSource.equals( this.btnAuto ) )		{			if ( fCurrent == null )			{				fCurrent = ColorDefinitionImpl.TRANSPARENT( );			}			if ( fCurrent instanceof ColorDefinition )			{				ColorDefinition color = (ColorDefinition) fCurrent;				color.unsetBlue( );				color.unsetGreen( );				color.unsetRed( );				color.unsetTransparency( );			}			setFill( fCurrent );			fireHandleEvent( FillChooserComposite.FILL_CHANGED_EVENT );			cmpDropDown.getShell( ).dispose( );		}		else if ( oSource.equals( this.btnCustom ) )		{			ColorDialog cDlg = new ColorDialog( this.getShell( ), SWT.NONE );			cmpDropDown.getParent( ).dispose( );			int iTrans = 255;			if ( fCurrent instanceof ColorDefinition )			{				if ( !fCurrent.equals( ColorDefinitionImpl.TRANSPARENT( ) ) )				{					iTransparency = ( (ColorDefinition) fCurrent ).getTransparency( );				}				cDlg.setRGB( new RGB( ( (ColorDefinition) this.fCurrent ).getRed( ),						( (ColorDefinition) this.fCurrent ).getGreen( ),						( (ColorDefinition) this.fCurrent ).getBlue( ) ) );			}			RGB rgb = cDlg.open( );			if ( rgb != null )			{				ColorDefinition cdNew = AttributeFactory.eINSTANCE.createColorDefinition( );				cdNew.set( rgb.red, rgb.green, rgb.blue );				cdNew.setTransparency( ( bTransparencyChanged )						? this.iTransparency : iTrans );				addAdapters( cdNew );				this.setFill( cdNew );				fireHandleEvent( FillChooserComposite.FILL_CHANGED_EVENT );			}		}		else if ( oSource.equals( this.btnGradient ) )		{			GradientEditorDialog ged = null;			cmpDropDown.getParent( ).dispose( );			if ( fCurrent instanceof Gradient )			{				ged = new GradientEditorDialog( this.getShell( ),						(Gradient) fCurrent );			}			else if ( fCurrent instanceof ColorDefinition )			{				ColorDefinition newCD = (ColorDefinition) EcoreUtil.copy( fCurrent );				newCD.eAdapters( ).addAll( fCurrent.eAdapters( ) );				ged = new GradientEditorDialog( this.getShell( ), null, newCD );			}			else			{				ged = new GradientEditorDialog( this.getShell( ), null );			}			if ( ged.getGradient( ) != null )			{				Fill fTmp = ged.getGradient( );				addAdapters( fTmp );				if ( fCurrent == null || !( fCurrent.equals( fTmp ) ) )				{					this.setFill( fTmp );					fireHandleEvent( FillChooserComposite.FILL_CHANGED_EVENT );				}			}		}		else if ( oSource.equals( srTransparency ) )		{			iTransparency = srTransparency.getSelection( );			lblTransparency.setText( new MessageFormat( Messages.getString( "FillChooserComposite.Lbl.Opacity" ) ) //$NON-NLS-1$			.format( new Object[]{				new Integer( iTransparency )			} ) );			srTransparency.setToolTipText( String.valueOf( srTransparency.getSelection( ) ) );			if ( fCurrent instanceof ColorDefinition )			{				( (ColorDefinition) fCurrent ).setTransparency( iTransparency );			}			setFill( fCurrent );			bTransparencyChanged = true;		}	}