1

User settings often present in my application. The settings values can not be predetermined. For example a certain font size. For each size, I will not create css file and will not write inline-style css for font size. Suppose there is a set of Node, each marked with the class of css. Is it possible to change the css body for this css class? How to solve this problem for non-predetermined sets of settings values?

It comes to mind only the solution such generating css file in the user directory

DmitriyAntonov
  • 107
  • 1
  • 9
  • 1
    Indeed, it seems that dynamically generating and reloading the CSS file is the only solution currently available - see http://stackoverflow.com/questions/17769388/javafx-change-css-at-runtime and https://community.oracle.com/thread/2566519?start=0&tstart=0 – Andreas Fester Jan 25 '16 at 09:45
  • 1
    I would probably use either a generated file, as you describe, or inline styles (which might be cleaner for this use case) for this kind of functionality. Note that if you're just changing colors, there are tricks with "looked-up colors" that you can use, but for other settings that won't work. – James_D Jan 25 '16 at 12:43
  • Thank you for your references "looked-up colors", it's cool feature. – DmitriyAntonov Jan 26 '16 at 13:42

0 Answers0