public static class UiBinding.PickerAdapter<PropertyType>

  1. Object
  2. UiBinding.ComponentAdapter<PropertyType, Picker>
  3. UiBinding.PickerAdapter

Adapts a com.codename1.ui.spinner.Picker to binding

Parameters

  • the: type of the property generic

Constructors

public PickerAdapter(UiBinding.ObjectConverter toPropertyType, int pickerType)Constructs a new binding
public PickerAdapter(UiBinding.MappingConverter toPropertyType, UiBinding.MappingConverter toComponentType)Constructs a new binding for mapping back and forth of a String Picker

Methods

public void assignTo(PropertyType value, Picker cmp)Assigns the value from the property into the component
public PropertyType getFrom(Picker cmp)Returns the value for the set method of the property from the given component
public void bindListener(Picker cmp, ActionListener<ActionEvent> l)Binds an action listener to changes in the component
public void removeListener(Picker cmp, ActionListener<ActionEvent> l)Removes the action listener from changes in the component

Inherited fields

Inherited methods

Constructor details

PickerAdapter

public PickerAdapter(UiBinding.ObjectConverter toPropertyType, int pickerType)
Constructs a new binding

Parameters

toPropertyType UiBinding.ObjectConverter
the conversion logic to the property
pickerType int
the type of the picker

PickerAdapter

public PickerAdapter(UiBinding.MappingConverter toPropertyType, UiBinding.MappingConverter toComponentType)
Constructs a new binding for mapping back and forth of a String Picker

Parameters

toPropertyType UiBinding.MappingConverter
map to convert objects forth
toComponentType UiBinding.MappingConverter
map to convert objects back

Method details

assignTo

public void assignTo(PropertyType value, Picker cmp)
Assigns the value from the property into the component

Parameters

value PropertyType
the value that was returned from the property get method
cmp Picker
the component instance

getFrom

public PropertyType getFrom(Picker cmp)
Returns the value for the set method of the property from the given component

Parameters

cmp Picker
the component

Returns

the value we can place into the set method

bindListener

public void bindListener(Picker cmp, ActionListener<ActionEvent> l)
Binds an action listener to changes in the component

Parameters

cmp Picker
the component
l ActionListener<ActionEvent>
listener

removeListener

public void removeListener(Picker cmp, ActionListener<ActionEvent> l)
Removes the action listener from changes in the component

Parameters

cmp Picker
the component
l ActionListener<ActionEvent>
listener