0
votes

I was wondering if there is a way to make a JavaFX Slider to show logaritmically spaced tick marks. I suspect there is none. If this is the case what would be the best way to go about implementing this do you think? I should mention that I have seen this but the accepted answer is not what I want.

So what I know is possible is this: enter image description here

But I want are tick marks spaced like this: http://www.dplot.com/logarithmic/loglin_h600.png

That the tick marks show their respective values is not important.

Thanks for your time.

1
You would need to write a new SliderSkin implementation... - James_D
What is a SliderSkin? - Ivar Eriksson
The skin for the slider... docs.oracle.com/javase/9/docs/api/javafx/scene/control/skin/… See also the "Architecture" section in the javafx.scene.control documentation. - James_D
Hmm okay, have never heard of that before. Will look into it! - Ivar Eriksson
It's a highly non-trivial task to implement a skin. - James_D

1 Answers

1
votes

You can use a linear Slider with linear tick marks and every time you get a result you calculate the logarithmus of it and work with that.