* @param values an array of known values
* @param required denotes whether this is a required field
* @return {@link ComboAttribute} widget set
*/
protected ComboAttribute createComboAttribute(Composite client, String attr, String[] values, boolean required) {
ComboAttribute comboAttr = new ComboAttribute(client, toolkit, attr, values, required) {
@Override
public void modifyAttribute() {
editAttribute(attr, combo.getItem(combo.getSelectionIndex()));
}
@Override
public void update() {
setComboSelection(combo, getAttributeValue(attr));
}
};
comboAttr.createAttribute(2);
return comboAttr;
}