javahtmlcssjfxtras

JFXtras css styling


Today I downloaded the JFXtras, but I can't find any information about css stylings for the jfxtras elements. E.g. I would like to know how to style a ListSpinner. I just found this for the value text of the spinner:

.ListSpinner .value {
        -fx-font-weight: bold;
}

How can I style the rest? Or does a list with possible css "commands" exist somewhere?

greetings


Solution

  • Yes, the documentation is lacking on that topic. I am sorry; it's always the same issue with spending time on new things, bug fixes or documentation. Documentation very often loses.

    ListSpinner uses standard nodes, so you can use the standard JavaFX styling, here you can find how the nodes are setup per default. https://github.com/JFXtras/jfxtras/blob/8.0/jfxtras-controls/src/main/resources/jfxtras/internal/scene/control/ListSpinner.css

    Answering Tony; -fx- are special JavaFX selectors, to not conflict with the official CSS selectors. JFXtras uses -fxx- for its custom things, for example -fxx-arrow-direction, -fxx-arrow-position and -fxx-value-alignment (https://github.com/JFXtras/jfxtras/blob/8.0/jfxtras-controls/src/main/java/jfxtras/internal/scene/control/skin/ListSpinnerSkin.java)

    I promise to improve the documentation of listspinner soon.