Re: Reloading stylesheets

2013-12-12 Thread Jerome Cambon
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

Re: Reloading stylesheets

2013-12-12 Thread ngalarneau
:Re: Reloading stylesheets Sent by:openjfx-dev-boun...@openjdk.java.net This is also impacting Scene Builder. I have filed a Jira with a test case: https://javafx-jira.kenai.com/browse/RT-34863 Jerome On 12/11/13 6:19 PM, David Grieve wrote: There is clearly a bug there somewhere

Re: Reloading stylesheets

2013-12-12 Thread David Grieve
-jira.kenai.com/browse/RT-34850 The slight difference is that I applied the stylesheet on the scene instead of the button. Neil From: Jerome Cambon jerome.cam...@oracle.com To: openjfx-dev@openjdk.java.net Date: 12/12/2013 04:26 AM Subject:Re: Reloading stylesheets Sent

Re: Reloading stylesheets

2013-12-12 Thread ngalarneau
David, Sounds good. Thanks, Neil From: David Grieve david.gri...@oracle.com To: ngalarn...@abinitio.com Cc: openjfx-dev@openjdk.java.net List openjfx-dev@openjdk.java.net Date: 12/12/2013 08:52 AM Subject:Re: Reloading stylesheets Thanks, Neil. The underlying cause

Re: Reloading stylesheets

2013-12-11 Thread ngalarneau
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

Re: Reloading stylesheets

2013-12-11 Thread David Grieve
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

Re: Reloading stylesheets

2013-12-10 Thread Tom Schindl
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

Re: Reloading stylesheets

2013-12-10 Thread Scott Palmer
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

Re: Reloading stylesheets

2013-12-10 Thread Werner Lehmann
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

Re: Reloading stylesheets

2013-12-10 Thread Werner Lehmann
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

Re: Reloading stylesheets

2013-12-10 Thread Tom Schindl
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

Re: Reloading stylesheets

2013-12-10 Thread Werner Lehmann
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!

Re: Reloading stylesheets

2013-12-10 Thread David Grieve
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

Re: Reloading stylesheets

2013-12-10 Thread Werner Lehmann
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. [...]

RE: Reloading stylesheets

2013-12-10 Thread John Smith
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! On 10.12.2013