Situation:
I have two sliders:
Slider slider1 = new Slider(); // can be of values from 0 to 100
Slider slider3 = new Slider(-100,200,10); // can be of values from -100 to 200.
I say
slider3.valueProperty().bindBidirectional(slider1.valueProperty());
I can set slider3 to value 200, by mouse for example. But Slider 1 can not be set to such value and that lead to situation, when slider1's value stays 100 (I look on slider1's value property using text field and it is 100). But slider3's value stays 200. So values became non-equivalent.
I see two decisions:
- apply feedback (when the second value can't be set according to the first, or was set, but returned back, then the first value is to be set according to the second value (block changing))
- reassign this issue on docs and write in javadoc about this (such cases are not described).
I have two sliders:
Slider slider1 = new Slider(); // can be of values from 0 to 100
Slider slider3 = new Slider(-100,200,10); // can be of values from -100 to 200.
I say
slider3.valueProperty().bindBidirectional(slider1.valueProperty());
I can set slider3 to value 200, by mouse for example. But Slider 1 can not be set to such value and that lead to situation, when slider1's value stays 100 (I look on slider1's value property using text field and it is 100). But slider3's value stays 200. So values became non-equivalent.
I see two decisions:
- apply feedback (when the second value can't be set according to the first, or was set, but returned back, then the first value is to be set according to the second value (block changing))
- reassign this issue on docs and write in javadoc about this (such cases are not described).