Saturday, June 26, 2010

Slider

Have been playing around a bit with the JavaFX slider control. Used two sliders in the following example. There is a text that is lighted by a red light source. The azimuth and elevation of the light is controlled by the two sliders.


The source code for the example can be found here.

Noted that the right pointing arrow key on the keyboard will change the focus form the vertical slider to the horizontal slider. The arrow key that points upward will set focus on the vertical slider. The left and down arrows will however strangely enough not have this effect.

Another strange thing is that markings on the vertical slider seems to be reversed. The starting position of the vertical slider is set to 135 in the code, but the markers indicates that it is set to 45 when running the code. I do not think that the bug is in my code. It is probably instead a resident somewhere in javafx.scene.control.Slider package.

No comments:

Post a Comment