* value model (and it probably should be) then the underlying type of the bound property
* will be set as the mapped type on the underlying formatter factory
*/
public void bind(JComponent control, ValueModel valueModel)
{
DataField df = (DataField)control;
if (valueModel instanceof TypeAwareValueModel) {
TypeAwareValueModel value = (TypeAwareValueModel)valueModel;
AbstractFormatterFactory aff = df.getFormatterFactory();
if (aff != null && aff instanceof DataFieldFormatterFactory) {
((DataFieldFormatterFactory)aff).setMappedType(value.getValueType());
}
}
Bindings.bind(df, valueModel);