impression is that RELOADING should also
work...
Thank you for any suggestions,
Neil
From: David Grieve david.gri...@oracle.com
To: Werner Lehmann lehm...@media-interactive.de
Cc: openjfx-dev@openjdk.java.net
Date: 12/10/2013 11:10 AM
Subject:Re: Reloading stylesheets
Sent
should also
work...
Thank you for any suggestions,
Neil
From: David Grieve david.gri...@oracle.com
To: Werner Lehmann lehm...@media-interactive.de
Cc: openjfx-dev@openjdk.java.net
Date: 12/10/2013 11:10 AM
Subject:Re: Reloading stylesheets
Sent by:openjfx-dev-boun
To: Werner Lehmann lehm...@media-interactive.de
Cc: openjfx-dev@openjdk.java.net
Date: 12/10/2013 11:10 AM
Subject:Re: Reloading stylesheets
Sent by:openjfx-dev-boun...@openjdk.java.net
The way it works in 8.0 is that there is a cache of loaded stylesheets.
When
That doesn't work in 2.x because the CSS is cached on a scene base! A
trick that could work is to load the CSS with an URL like this like:
my.css?timestamp=123456789
but I have not tried that and don't know if this would work.
Tom
On 10.12.13 13:41, Scott Palmer wrote:
Have you tried simply
Hmm.. I'll have to take a look at what I was doing, because I had something
that appeared to work with 2.x and I'm pretty sure I wasn't using internal
APIs. Perhaps it was only working by chance.
Scott
On Tue, Dec 10, 2013 at 7:46 AM, Tom Schindl tom.schi...@bestsolution.atwrote:
That
Thanks, Tom. Somehow it does not work for me. Any idea?
Basically this is what I am doing:
Parent root = ...
root.getStyleSheets().add(...stylesheets...)
Scene scene = new Scene(root)
StyleManager.getInstance().reloadStylesheets(scene)
Then I show the scene in a JFXPanel, change and save the
Got it. The key was to move the stylesheets from the root node to the
scene before reloading them:
scene.styleSheets.clear
scene.styleSheets.addAll(root.styleSheets)
root.styleSheets.clear
styleManager.reload(scene)
The hotkey also works now: shift+ctrl+7 reloads CSS while the scene is
No on FX8 you need to remove and readd them! So the only thing different
is that you omit the reload-call on FX8.
Tom
On 10.12.13 16:10, Werner Lehmann wrote:
Got it. The key was to move the stylesheets from the root node to the
scene before reloading them:
scene.styleSheets.clear
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!
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
Makes sense. Thanks!
On 10.12.2013 17:09, David Grieve wrote:
The way it works in 8.0 is that there is a cache of loaded stylesheets. [...]
details would be useful.
Cheers,
Mark
-- Forwarded message --
From: Werner Lehmann lehm...@media-interactive.de
Date: Tue, Dec 10, 2013 at 9:03 AM
Subject: Re: Reloading stylesheets
To:
Cc: openjfx-dev@openjdk.java.net openjfx-dev@openjdk.java.net
Makes sense. Thanks
/514892290364bc17fc56c3c5/chapter26/about
John
-Original Message-
From: openjfx-dev-boun...@openjdk.java.net
[mailto:openjfx-dev-boun...@openjdk.java.net] On Behalf Of Mark Fortner
Sent: Tuesday, December 10, 2013 9:39 AM
To: openjfx-dev@openjdk.java.net
Subject: Fwd: Reloading stylesheets
It would
13 matches
Mail list logo