Closed nbrugger-tgm closed 3 years ago
At the moment you can just bind to a single property.
Example:
Car (object) |-- name (string) +-- broken (boolean)
At the moment if you create a JLabel you can just bind name or broken to the text of the label. But you cannot combine them
name
broken
Enable super binding. Super binding means that you bind to multiple properties and then receive the whole Car object instead of just one property
Car
binder.superBind(label::setText,this::nameComposition,"name","broken");
with
public String nameComposition(Car c){ return (c.broken ? "(broken)" : "" )+c.name; }
The second option offers more features and would most likely the choice for implementation
The feature is aviable since
3.1.0b1
At the moment you can just bind to a single property.
Example:
At the moment if you create a JLabel you can just bind
name
orbroken
to the text of the label. But you cannot combine themSolution
Enable super binding. Super binding means that you bind to multiple properties and then receive the whole
Car
object instead of just one propertyExamples
with
The second option offers more features and would most likely the choice for implementation