PropertyType
- the type of the property genericpublic static class UiBinding.PickerAdapter<PropertyType> extends UiBinding.ComponentAdapter<PropertyType,Picker>
Picker
to bindingtoComponentType, toPropertyType
Constructor and Description |
---|
PickerAdapter(UiBinding.MappingConverter toPropertyType,
UiBinding.MappingConverter toComponentType)
Constructs a new binding for mapping back and forth of a String Picker
|
PickerAdapter(UiBinding.ObjectConverter toPropertyType,
int pickerType)
Constructs a new binding
|
Modifier and Type | Method and Description |
---|---|
void |
assignTo(PropertyType value,
Picker cmp)
Assigns the value from the property into the component
|
void |
bindListener(Picker cmp,
ActionListener<ActionEvent> l)
Binds an action listener to changes in the component
|
PropertyType |
getFrom(Picker cmp)
Returns the value for the set method of the property from the given component
|
void |
removeListener(Picker cmp,
ActionListener<ActionEvent> l)
Removes the action listener from changes in the component
|
public PickerAdapter(UiBinding.ObjectConverter toPropertyType, int pickerType)
toPropertyType
- the conversion logic to the propertypickerType
- the type of the pickerpublic PickerAdapter(UiBinding.MappingConverter toPropertyType, UiBinding.MappingConverter toComponentType)
toPropertyType
- map to convert objects forthtoComponentType
- map to convert objects backpublic void assignTo(PropertyType value, Picker cmp)
UiBinding.ComponentAdapter
assignTo
in class UiBinding.ComponentAdapter<PropertyType,Picker>
value
- the value that was returned from the property get methodcmp
- the component instancepublic PropertyType getFrom(Picker cmp)
UiBinding.ComponentAdapter
getFrom
in class UiBinding.ComponentAdapter<PropertyType,Picker>
cmp
- the componentpublic void bindListener(Picker cmp, ActionListener<ActionEvent> l)
UiBinding.ComponentAdapter
bindListener
in class UiBinding.ComponentAdapter<PropertyType,Picker>
cmp
- the componentl
- listenerpublic void removeListener(Picker cmp, ActionListener<ActionEvent> l)
UiBinding.ComponentAdapter
removeListener
in class UiBinding.ComponentAdapter<PropertyType,Picker>
cmp
- the componentl
- listener