Before introducing EasyBind -
DoubleBinding contentHeight = Bindings.createDoubleBinding(
() -> getHeight() - getInsets().getTop() - getInsets().getBottom(),
heightProperty(), insetsProperty());
After introducing EasyBind -
Binding<Double> contentHeight = EasyBind.combine(
heightProperty(), insetsProperty(),
(h, i) -> h.doubleValue() - i.getTop() - i.getBottom());
I'm somewhat uncomfortable regarding doubleValue()
part. Every time I combine
some subclass of NumberProperty
, EasyBind passes Number
instead of i.e. Double
, Integer
, ...
Is there some way to avoid doubleValue()
?