Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get rid of these CSS warnings in my JavaFX custom control?

I am currently developing a custom JavaFX 8 control and was about to make the first release available when Oracle released JDK u20. After upgrading to this version my control now triggers a long list of CSS warnings that look like this:

"Could not resolve '-fx-base' while resolving lookups for '-fx-background-color' from rule '*.test' in stylesheet test.css".

Note: I am not calling any of these suspicious methods: applyCSS(), layout(), or impl_processCSS().

What could be the possible reason for this?

like image 254
Dirk Lemmermann Avatar asked Aug 29 '14 11:08

Dirk Lemmermann


1 Answers

The messages were caused by changes made by Oracle to the CSS engine. Custom controls that implemented the method Control.getUserAgentStylesheet() were likely to trigger them. There were a couple of work-arounds that were suggested to fix this but in the meantime release 8u40 moved the method to Region and it is now fully supported again. However, if your project also uses ControlsFX then you will still see them until you upgrade to ControlsFX 8.40.9.

like image 163
Dirk Lemmermann Avatar answered Oct 18 '22 08:10

Dirk Lemmermann