Relative Content

Tag Archive for javaanimationjavafx

How to interpolate Node color using custom CSS variables?

There’s a node and I need to dynamically change its color. I also want to do this using CSS variables. The problem is that JavaFX seems to only perform a CSS lookup when a node property (fill) is explicitly bound to the corresponding styleable object property, the value of which should be obtained via CSS. In other words, CSS only works if styleable property is bound to a node property and that node exists in the scene graph.

How to interpolate Node color using custom CSS variables?

There’s a node and I need to dynamically change its color. I also want to do this using CSS variables. The problem is that JavaFX seems to only perform a CSS lookup when a node property (fill) is explicitly bound to the corresponding styleable object property, the value of which should be obtained via CSS. In other words, CSS only works if styleable property is bound to a node property and that node exists in the scene graph.