public static class UiBinding.TextComponentAdapter<PropertyType>
- Object
- UiBinding.ComponentAdapter<PropertyType, TextComponent>
- UiBinding.TextComponentAdapter
Adapts a com.codename1.ui.TextComponent to binding
Parameters
the: type of the property generic
Constructors
public TextComponentAdapter(UiBinding.ObjectConverter toPropertyType) | Constructs a new binding |
public TextComponentAdapter() | Constructs a new binding assuming a String property |
Methods
public void assignTo(PropertyType value, TextComponent cmp) | Assigns the value from the property into the component |
public PropertyType getFrom(TextComponent cmp) | Returns the value for the set method of the property from the given component |
public void bindListener(TextComponent cmp, ActionListener<ActionEvent> l) | Binds an action listener to changes in the component |
public void removeListener(TextComponent cmp, ActionListener<ActionEvent> l) | Removes the action listener from changes in the component |
Inherited fields
Inherited methods
Constructor details
TextComponentAdapter
public TextComponentAdapter(UiBinding.ObjectConverter toPropertyType)Constructs a new binding
Parameters
toPropertyTypeUiBinding.ObjectConverter- the conversion logic to the property
TextComponentAdapter
public TextComponentAdapter()Constructs a new binding assuming a String property
Method details
assignTo
public void assignTo(PropertyType value, TextComponent cmp)Assigns the value from the property into the component
Parameters
valuePropertyType- the value that was returned from the property get method
cmpTextComponent- the component instance
getFrom
public PropertyType getFrom(TextComponent cmp)Returns the value for the set method of the property from the given component
Parameters
cmpTextComponent- the component
Returns
the value we can place into the set method
bindListener
public void bindListener(TextComponent cmp, ActionListener<ActionEvent> l)Binds an action listener to changes in the component
Parameters
cmpTextComponent- the component
lActionListener<ActionEvent>- listener
removeListener
public void removeListener(TextComponent cmp, ActionListener<ActionEvent> l)Removes the action listener from changes in the component
Parameters
cmpTextComponent- the component
lActionListener<ActionEvent>- listener