private class CheckboxPropertyFactory implements PropertyFactory<Checkbox> {
@Override
public Property create(FieldMetadata<Object, ?> fieldMetadata, String id, Checkbox info) {
UICheckbox checkbox = new UICheckbox();
Binding<Boolean> binding = new BooleanTextBinding((FieldMetadata<Object, Boolean>) fieldMetadata);
checkbox.bindChecked(binding);
String label = fromLabelOrId(info.label(), id);
return new Property<>(label, binding, checkbox, info.description());
}
}