# Class UiBinding.PickerAdapter<PropertyType>

java.lang.Object
com.codename1.properties.UiBinding.ComponentAdapter<PropertyType, Picker>
com.codename1.properties.UiBinding.PickerAdapter<PropertyType>

Enclosing class:
  `UiBinding`

public static class UiBinding.PickerAdapter<PropertyType> extends UiBinding.ComponentAdapter<PropertyType, Picker>

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

##### Parameters

- `the`: type of the property generic

- ## Field Summary

  ### Fields inherited from class UiBinding.ComponentAdapter

  `toComponentType, toPropertyType`

- ## Constructor Summary

  Constructors
  Constructor
  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

- ## Method Summary

  Modifier and Type
  Method
  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

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### PickerAdapter

    public PickerAdapter(UiBinding.ObjectConverter toPropertyType, int pickerType)

    Constructs a new binding

    ###### Parameters

    - `toPropertyType`: the conversion logic to the property

    - `pickerType`: 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`: map to convert objects forth

    - `toComponentType`: map to convert objects back

- ## Method Details

  - ### assignTo

    public void assignTo(PropertyType value, Picker cmp)
    Description copied from class: `UiBinding.ComponentAdapter`

    Assigns the value from the property into the component

    ###### Parameters

    - `value`: the value that was returned from the property get method

    - `cmp`: the component instance

    Specified by:
      `assignTo` in class `UiBinding.ComponentAdapter<PropertyType, Picker>`

  - ### getFrom

    public PropertyType getFrom(Picker cmp)
    Description copied from class: `UiBinding.ComponentAdapter`

    Returns the value for the set method of the property from the given component

    ###### Parameters

    - `cmp`: the component

    ###### Returns

    the value we can place into the set method

    Specified by:
      `getFrom` in class `UiBinding.ComponentAdapter<PropertyType, Picker>`

  - ### bindListener

    public void bindListener(Picker cmp, ActionListener<ActionEvent> l)
    Description copied from class: `UiBinding.ComponentAdapter`

    Binds an action listener to changes in the component

    ###### Parameters

    - `cmp`: the component

    - `l`: listener

    Specified by:
      `bindListener` in class `UiBinding.ComponentAdapter<PropertyType, Picker>`

  - ### removeListener

    public void removeListener(Picker cmp, ActionListener<ActionEvent> l)
    Description copied from class: `UiBinding.ComponentAdapter`

    Removes the action listener from changes in the component

    ###### Parameters

    - `cmp`: the component

    - `l`: listener

    Specified by:
      `removeListener` in class `UiBinding.ComponentAdapter<PropertyType, Picker>`