david.grieve at oracle.com
Tue Dec 10 08:09:38 PST 2013
The way it works in 8.0 is that there is a cache of loaded stylesheets. When a scene or parent adds a stylesheet, the stylesheet is added to the cache. Any other scene or parent that uses the same stylesheet will get the one from cache. If a scene or parent later removes the stylesheet, the stylesheet is removed from the cache and the css style cache for any scene or parent that referenced that stylesheet is cleared (since the set of styles may have changed). Any scene or parent that referenced the now removed stylesheet is told to reapply its styles. Since the stylesheet is no longer in cache, it will be re-parsed (or reloaded if there is a binary version of the stylesheet) when it is called for by a scene or parent.
The way it worked in 2.x was an abomination.
On Dec 10, 2013, at 10:30 AM, Werner Lehmann <lehmann at media-interactive.de> wrote:
> Interesting. Assuming the stylesheets are still cached, how would it know when to reload and not use the cached sheet? Or has sheet processing been optimized so much that caching is not necessary anymore...
> On 10.12.2013 16:15, Tom Schindl wrote:
>> No on FX8 you need to remove and readd them! So the only thing different
>> is that you omit the reload-call on FX8.
More information about the openjfx-dev