Class UiBinding.TextComponentAdapter<PropertyType>
java.lang.Object
com.codename1.properties.UiBinding.ComponentAdapter<PropertyType, TextComponent>
com.codename1.properties.UiBinding.TextComponentAdapter<PropertyType>
- Enclosing class:
UiBinding
public static class UiBinding.TextComponentAdapter<PropertyType>
extends UiBinding.ComponentAdapter<PropertyType, TextComponent>
Adapts a com.codename1.ui.TextComponent to binding
Parameters
the: type of the property generic
-
Field Summary
Fields inherited from class UiBinding.ComponentAdapter
toComponentType, toPropertyType -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new binding assuming a String propertyTextComponentAdapter(UiBinding.ObjectConverter toPropertyType) Constructs a new binding -
Method Summary
Modifier and TypeMethodDescriptionvoidassignTo(PropertyType value, TextComponent cmp) Assigns the value from the property into the componentvoidBinds an action listener to changes in the componentgetFrom(TextComponent cmp) Returns the value for the set method of the property from the given componentvoidRemoves the action listener from changes in the component
-
Constructor Details
-
TextComponentAdapter
Constructs a new binding
Parameters
toPropertyType: the conversion logic to the property
-
TextComponentAdapter
public TextComponentAdapter()Constructs a new binding assuming a String property
-
-
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, TextComponent>
-
-
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, TextComponent>
-
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, TextComponent>
-
-
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, TextComponent>
-
-