// Listen to unit changes.
control.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
Object oldValue = null;
Object newValue = control.getUnit();
PropertyChangeEvent propertyChange = new PropertyChangeEvent(
control, supplementary, oldValue, newValue);
controlDetails.attributesComposite.propertyChange(propertyChange);
}
});
// Listen to value changes.
control.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
Object oldValue = null;
Object newValue = control.getNumber();
PropertyChangeEvent propertyChange = new PropertyChangeEvent(
control, controlDetails.attribute, oldValue, newValue);
controlDetails.attributesComposite.
propertyChange(propertyChange);
}
});