selectedStateChanged();
});
}
private void selectedStateChanged() {
TranslateTransition transition = new TranslateTransition(Duration.millis(100), thumb);
double thumbAreaWidth = snapSize(thumbArea.prefWidth(-1));
double thumbWidth = snapSize(thumb.prefWidth(-1));
if (!getSkinnable().isSelected())
transition.setByX(-(thumbAreaWidth - thumbWidth));
else {
transition.setByX(thumbAreaWidth - thumbWidth);
}
transition.setCycleCount(1);
transition.play();
}