fccShadow = new FillChooserComposite(cmpGeneral, SWT.NONE, cdShadow, false, false); GridData gdFCCShadow = new GridData(GridData.FILL_BOTH); fccShadow.setLayoutData(gdFCCShadow); fccShadow.addListener(this); fccShadow.setEnabled(bEnableUI);
fccShadow = new FillChooserComposite( cmpGeneral, SWT.NONE, lblCurrent.eAdapters( ), cdShadow, false, false ); GridData gdFCCShadow = new GridData( GridData.FILL_BOTH ); fccShadow.setLayoutData( gdFCCShadow ); fccShadow.addListener( this ); fccShadow.setEnabled( bEnableUI );
	private void placeComponents() {		FillLayout flMain = new FillLayout();		flMain.marginHeight = 0;		flMain.marginWidth = 0;		GridLayout glAttributes = new GridLayout();		glAttributes.horizontalSpacing = 5;		glAttributes.verticalSpacing = 5;		glAttributes.marginHeight = 7;		glAttributes.marginWidth = 7;		GridLayout glGeneral = new GridLayout();		glGeneral.numColumns = 2;		glGeneral.horizontalSpacing = 5;		glGeneral.verticalSpacing = 5;		FillLayout flOutline = new FillLayout();		this.setLayout(flMain);		if (sGroupName == null || sGroupName.length() == 0) {			grpAttributes = new Composite(this, SWT.NONE);		} else {			grpAttributes = new Group(this, SWT.NONE);			((Group) grpAttributes).setText(sGroupName);		}		grpAttributes.setLayout(glAttributes);		cmpGeneral = new Composite(grpAttributes, SWT.NONE);		GridData gdCMPGeneral = new GridData(GridData.FILL_HORIZONTAL);		cmpGeneral.setLayoutData(gdCMPGeneral);		cmpGeneral.setLayout(glGeneral);		boolean bEnableUI = bEnabled;		if (bVisibilityEnabled) {			cbVisible = new Button(cmpGeneral, SWT.CHECK);			GridData gdCBVisible = new GridData(GridData.FILL_HORIZONTAL);			gdCBVisible.horizontalSpan = 2;			cbVisible.setLayoutData(gdCBVisible);			cbVisible.setSelection(this.lblCurrent.isVisible());			cbVisible.setText(Messages					.getString("LabelAttributesComposite.Lbl.IsVisible")); //$NON-NLS-1$			cbVisible.addSelectionListener(this);			if (bEnabled) {				bEnableUI = cbVisible.getSelection();			}		}		if (bPositionEnabled) {			lblPosition = new Label(cmpGeneral, SWT.NONE);			GridData gdLBLPosition = new GridData();			lblPosition.setLayoutData(gdLBLPosition);			lblPosition.setText(Messages					.getString("LabelAttributesComposite.Lbl.Position")); //$NON-NLS-1$			lblPosition.setEnabled(bEnableUI);			cmbPosition = new Combo(cmpGeneral, SWT.DROP_DOWN | SWT.READ_ONLY);			GridData gdCMBPosition = new GridData(GridData.FILL_BOTH);			cmbPosition.setLayoutData(gdCMBPosition);			cmbPosition.addSelectionListener(this);			cmbPosition.setEnabled(bEnableUI);		}		lblFont = new Label(cmpGeneral, SWT.NONE);		GridData gdLFont = new GridData();		lblFont.setLayoutData(gdLFont);		lblFont				.setText(Messages						.getString("LabelAttributesComposite.Lbl.Font")); //$NON-NLS-1$		lblFont.setEnabled(bEnableUI);		fdcFont = new FontDefinitionComposite(cmpGeneral, SWT.NONE,				this.fdCurrent, this.cdFont, this.isAlignmentEnabled);		GridData gdFDCFont = new GridData(GridData.FILL_BOTH);		gdFDCFont.heightHint = fdcFont.getPreferredSize().y;		gdFDCFont.widthHint = 96;		gdFDCFont.grabExcessVerticalSpace = false;		fdcFont.setLayoutData(gdFDCFont);		fdcFont.addListener(this);		fdcFont.setEnabled(bEnableUI);		lblFill = new Label(cmpGeneral, SWT.NONE);		GridData gdLFill = new GridData();		lblFill.setLayoutData(gdLFill);		lblFill.setText(Messages				.getString("LabelAttributesComposite.Lbl.Background")); //$NON-NLS-1$		lblFill.setEnabled(bEnableUI);		fccBackground = new FillChooserComposite(cmpGeneral, SWT.NONE,				fBackground, false, false);		GridData gdFCCBackground = new GridData(GridData.FILL_BOTH);		gdFCCBackground.heightHint = fccBackground.getPreferredSize().y;		fccBackground.setLayoutData(gdFCCBackground);		fccBackground.addListener(this);		fccBackground.setEnabled(bEnableUI);		if (bShadowEnabled) {			lblShadow = new Label(cmpGeneral, SWT.NONE);			GridData gdLBLShadow = new GridData();			lblShadow.setLayoutData(gdLBLShadow);			lblShadow.setText(Messages					.getString("LabelAttributesComposite.Lbl.Shadow")); //$NON-NLS-1$			lblShadow.setEnabled(bEnableUI);			fccShadow = new FillChooserComposite(cmpGeneral, SWT.NONE,					cdShadow, false, false);			GridData gdFCCShadow = new GridData(GridData.FILL_BOTH);			fccShadow.setLayoutData(gdFCCShadow);			fccShadow.addListener(this);			fccShadow.setEnabled(bEnableUI);		}		grpOutline = new Group(grpAttributes, SWT.NONE);		GridData gdGOutline = new GridData(GridData.FILL_HORIZONTAL);		gdGOutline.heightHint = 110;		grpOutline.setLayoutData(gdGOutline);		grpOutline.setText(Messages				.getString("LabelAttributesComposite.Lbl.Outline")); //$NON-NLS-1$		grpOutline.setLayout(flOutline);		grpOutline.setEnabled(bEnableUI);		liacOutline = new LineAttributesComposite(grpOutline, SWT.NONE,				laCurrent, true, true, true);		liacOutline.addListener(this);		liacOutline.setEnabled(bEnableUI);		if (bInsetsEnabled == true) {			icInsets = new InsetsComposite(grpAttributes, SWT.NONE, insets,					sUnits, serviceprovider);			GridData gdICInsets = new GridData(GridData.FILL_HORIZONTAL);			gdICInsets.heightHint = icInsets.getPreferredSize().y;			gdICInsets.grabExcessVerticalSpace = false;			icInsets.addListener(this);			icInsets.setLayoutData(gdICInsets);			icInsets.setEnabled(bEnableUI);		}		populateLists();	}