* @param driverChangHandler the code to update the slider bases on the
* value of the driving property. This will be wrapped in a
* remove/add-listener pair to prevent circular updates.
*/
private <T> void initializeSlider(Slider slider, Runnable sliderChangeHandler, ReadOnlyObjectProperty<T> driver, Runnable driverChangHandler) {
final InvalidationListener sliderListener = observable -> {
if (slider.isValueChanging() == false) {
sliderChangeHandler.run();
}
};
slider.valueProperty().addListener(sliderListener);