PropertyType
- the type of the property genericpublic static class UiBinding.TextComponentAdapter<PropertyType> extends UiBinding.ComponentAdapter<PropertyType,TextComponent>
TextComponent
to bindingtoComponentType, toPropertyType
Constructor and Description |
---|
TextComponentAdapter()
Constructs a new binding assuming a String property
|
TextComponentAdapter(UiBinding.ObjectConverter toPropertyType)
Constructs a new binding
|
Modifier and Type | Method and Description |
---|---|
void |
assignTo(PropertyType value,
TextComponent cmp)
Assigns the value from the property into the component
|
void |
bindListener(TextComponent cmp,
ActionListener<ActionEvent> l)
Binds an action listener to changes in the component
|
PropertyType |
getFrom(TextComponent cmp)
Returns the value for the set method of the property from the given component
|
void |
removeListener(TextComponent cmp,
ActionListener<ActionEvent> l)
Removes the action listener from changes in the component
|
public TextComponentAdapter(UiBinding.ObjectConverter toPropertyType)
toPropertyType
- the conversion logic to the propertypublic TextComponentAdapter()
public void assignTo(PropertyType value, TextComponent cmp)
UiBinding.ComponentAdapter
assignTo
in class UiBinding.ComponentAdapter<PropertyType,TextComponent>
value
- the value that was returned from the property get methodcmp
- the component instancepublic PropertyType getFrom(TextComponent cmp)
UiBinding.ComponentAdapter
getFrom
in class UiBinding.ComponentAdapter<PropertyType,TextComponent>
cmp
- the componentpublic void bindListener(TextComponent cmp, ActionListener<ActionEvent> l)
UiBinding.ComponentAdapter
bindListener
in class UiBinding.ComponentAdapter<PropertyType,TextComponent>
cmp
- the componentl
- listenerpublic void removeListener(TextComponent cmp, ActionListener<ActionEvent> l)
UiBinding.ComponentAdapter
removeListener
in class UiBinding.ComponentAdapter<PropertyType,TextComponent>
cmp
- the componentl
- listener