Issue
I want to dynamically bind to the property with the lesser out of two value, so i can "fit" the circle into the bbox. Ideally i hoped there is method like min or max for properties (hypothetical example below), but there is none as far as i looked. Can anyone suggest an alternative?
this.outline.radiusProperty().bind(this.heightProperty().divide(2.).min(this.widthProperty().divide(2.)));
Solution
The "high-level" Bindings API has a Bindings.min(...)
method:
this.outline.radiusProperty().bind(Bindings.min(
this.heightProperty().divide(2.),
this.widthProperty().divide(2.)
));
Answered By - James_D
Answer Checked By - Terry (JavaFixing Volunteer)