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, toPropertyTypeModifier and TypeFieldDescriptionprotected final UiBinding.ObjectConverterUsed by the subclass to convert values from the property to the componentprotected final UiBinding.ObjectConverterUsed by the subclass to convert values from the component to the property -
Constructor Summary
ConstructorsConstructorDescriptionPickerAdapter(UiBinding.MappingConverter toPropertyType, UiBinding.MappingConverter toComponentType) Constructs a new binding for mapping back and forth of a String PickerPickerAdapter(UiBinding.ObjectConverter toPropertyType, int pickerType) Constructs a new binding -
Method Summary
Modifier and TypeMethodDescriptionvoidassignTo(PropertyType value, Picker cmp) Assigns the value from the property into the componentvoidbindListener(Picker cmp, ActionListener<ActionEvent> l) Binds an action listener to changes in the componentReturns the value for the set method of the property from the given componentvoidremoveListener(Picker cmp, ActionListener<ActionEvent> l) Removes the action listener from changes in the componentMethods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()booleanIndicates whether some other object is "equal to" this one.final ClassgetClass()Returns the runtime class of an object.inthashCode()Returns a hash code value for the object.final voidnotify()Wakes up a single thread that is waiting on this object's monitor.final voidWakes up all threads that are waiting on this object's monitor.toString()Returns a string representation of the object.final voidwait()Causes current thread to wait until another thread invokes the method or the method for this object.final voidwait(long timeout) Causes current thread to wait until either another thread invokes the method or the method for this object, or a specified amount of time has elapsed.final voidwait(long timeout, int nanos) Causes current thread to wait until another thread invokes the method or the method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
-
Constructor Details
-
PickerAdapter
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
Description copied from class:UiBinding.ComponentAdapterAssigns 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:
assignToin classUiBinding.ComponentAdapter<PropertyType, Picker>
-
-
getFrom
Description copied from class:UiBinding.ComponentAdapterReturns 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:
getFromin classUiBinding.ComponentAdapter<PropertyType, Picker>
-
bindListener
Description copied from class:UiBinding.ComponentAdapterBinds an action listener to changes in the component
Parameters
-
cmp: the component -
l: listener
- Specified by:
bindListenerin classUiBinding.ComponentAdapter<PropertyType, Picker>
-
-
removeListener
Description copied from class:UiBinding.ComponentAdapterRemoves the action listener from changes in the component
Parameters
-
cmp: the component -
l: listener
- Specified by:
removeListenerin classUiBinding.ComponentAdapter<PropertyType, Picker>
-
-