lblStyle.setEnabled(bEnableUI); cmbStyle.setEnabled(bEnableUI); lblWidth.setEnabled(bEnableUI); cmbWidth.setEnabled(bEnableUI);
if (bEnableStyles) { lblStyle.setEnabled(bEnableUI); cmbStyle.setEnabled(bEnableUI); } if (bEnableWidths) { lblWidth.setEnabled(bEnableUI); cmbWidth.setEnabled(bEnableUI); }
    public void widgetSelected(SelectionEvent e)    {        Object oSource = e.getSource();        if (oSource.equals(cbVisible))        {            // Notify Listeners that a change has occurred in the value            fireValueChangedEvent(LineAttributesComposite.VISIBILITY_CHANGED_EVENT, new Boolean(cbVisible                .getSelection()));            // Enable/Disable UI Elements            boolean bEnableUI = cbVisible.getSelection();            lblStyle.setEnabled(bEnableUI);            cmbStyle.setEnabled(bEnableUI);            lblWidth.setEnabled(bEnableUI);            cmbWidth.setEnabled(bEnableUI);            lblColor.setEnabled(bEnableUI);            cmbColor.setEnabled(bEnableUI);        }    }