Quantcast
Channel: Java SE Snapshots: Project Feedback Related Items on Java.net
Viewing all articles
Browse latest Browse all 261

JavaFX2 Slider Tick Offset

$
0
0

Hello,

I want to use a JavaFX2 slider for changing a Date value. I convert the Date value to double and vice versa by taking a year as the value 1. So the values are mapped as follows:
January 1st 2014 -> 2014.00000
February 21st 2014 -> 2014.14207
October 3rd 2014 -> 2014.75409
January 1st 2015 -> 2015.00000
So far that works good.
Now I want tick marks and tick labels to be displayed at the beginnings of the years. I set the major tick unit to 1.
Now the tick marks and labels have a interval of one year, but they don´t begin at an integer value. They begin at the min value of the slider. So I get the Labels "2013.249", "2014.249", ...
Is there a way to set an offset for the tick positions?

Thanks & Regards
Michael Franke


Viewing all articles
Browse latest Browse all 261

Trending Articles