In this tutorial we make a nice lightweight UI control - Toggle Switch and we are going to be model it based on iOS 8 style toggle switch.
Source code: https://github.com/AlmasB/FXTutorials/blob/master/src/com/almasb/ios/IOSApp.java
If you do want to achieve that shadow effect on the left image, you can do the following and maybe play around with shadow properties:
DropShadow shadow = new DropShadow();
shadow.setRadius(2);
trigger.setEffect(shadow);
Please complete this 3 question survey which takes less than 10 seconds https://www.surveymonkey.com/s/72626MD so I can improve the channel content