JavaFX - Flat Carousel
By Rakesh Menon on Mar 05, 2010
There was a request to write a Flat Carousel, here is an attempt using HBox, ClipView and Timeline.
<script src="http://dl.javafx.com/1.2/dtfx.js"></script> <script src="http://javafxdemos.googlecode.com/hg/resource/FlatCarousel/FlatCarousel.js"></script>
The HBox content is clipped using ClipView layout. When user drags the node, the ClipView.clipX is updated accordingly using a Timeline + EASEOUT Interpolator. We may use custom Interpolator as shown in SpringAnimation sample. Two buttons (vertical bars) are provided on both sides to scroll as per the width of the Carousel.
Please try it out and let me know feedback..