It’s been a while since I’ve worked on JMetro.

This time a control that’s not part of the windows framework: the spinner.
I opted to style the control in its STYLE_CLASS_SPLIT_ARROWS_HORIZONTAL style, that is horizontal arrows split between left and right sides. To style the control you need to add the style you want to the StyleClass observable list:

spinner.getStyleClass().add(Spinner.STYLE_CLASS_SPLIT_ARROWS_HORIZONTAL);

the other possible styles are:

STYLE_CLASS_ARROWS_ON_LEFT_HORIZONTAL
STYLE_CLASS_ARROWS_ON_LEFT_VERTICAL
STYLE_CLASS_ARROWS_ON_RIGHT_HORIZONTAL
STYLE_CLASS_SPLIT_ARROWS_VERTICAL

And here are the controls in their light and dark theme:

spinner - light theme 2

Spinner – light theme

spinner - dark theme 2

Spinner – dark theme

 
 
As always you can get this at jfxtras.

2 thoughts on “Metro style spinner for java (JMetro)

Leave a Reply

Your email address will not be published. Required fields are marked *