boolean bUIEnabled = cbVisible.getSelection(); if (bEnableStyles) { cmbStyle.setEnabled(bUIEnabled); lblStyle.setEnabled(bUIEnabled); } if (bEnableWidths) { cmbWidth.setEnabled(bUIEnabled); lblWidth.setEnabled(bUIEnabled); } cmbColor.setEnabled(bUIEnabled); lblColor.setEnabled(bUIEnabled);
    public void setLineAttributes(LineAttributes attributes)    {        laCurrent = attributes;        if (bEnableVisibility)        {            if (laCurrent == null)            {                cbVisible.setSelection(false);            }            else            {                cbVisible.setSelection(attributes.isVisible());            }        }        if (bEnableStyles)        {            if (laCurrent == null)            {                cmbStyle.setLineStyle(getSWTLineStyle(LineStyle.SOLID_LITERAL));            }            else            {                cmbStyle.setLineStyle(getSWTLineStyle(attributes.getStyle()));            }        }        if (this.bEnableWidths)        {            if (laCurrent == null)            {                cmbWidth.setLineWidth(1);            }            else            {                cmbWidth.setLineWidth(attributes.getThickness());            }        }        if (laCurrent == null)        {            cmbColor.setFill(null);        }        else        {            cmbColor.setFill(attributes.getColor());        }        cmbColor.redraw();        redraw();    }