David,
Sounds good.
Thanks,
Neil
From: David Grieve
To: ngalarn...@abinitio.com
Cc: "openjfx-dev@openjdk.java.net List"
Date: 12/12/2013 08:52 AM
Subject: Re: Reloading stylesheets
Thanks, Neil. The underlying cause is likely to be the same. I'm go
https://javafx-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
> To: openjfx-dev@openjdk.java.net
> Date: 12/12/2013 04:26 AM
>
my impression is that RELOADING should
also
>> work...
>>
>> Thank you for any suggestions,
>>
>> Neil
>>
>>
>>
>>
>> From: David Grieve
>> To: Werner Lehmann
>> Cc: openjfx-dev@openjdk.java.net
>> Date: 12/10/201
your description below, my impression is that RELOADING should also
work...
Thank you for any suggestions,
Neil
From: David Grieve
To: Werner Lehmann
Cc: openjfx-dev@openjdk.java.net
Date: 12/10/2013 11:10 AM
Subject:Re: Reloading stylesheets
Sent by:openjfx-dev-bo
lso
> work...
>
> Thank you for any suggestions,
>
> Neil
>
>
>
>
> From: David Grieve
> To: Werner Lehmann
> Cc: openjfx-dev@openjdk.java.net
> Date: 12/10/2013 11:10 AM
> Subject:Re: Reloading stylesheets
> Sent by:op
my impression is that RELOADING should also
work...
Thank you for any suggestions,
Neil
From: David Grieve
To: Werner Lehmann
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
ument
provides a start but more details would be useful.
Cheers,
Mark
-- Forwarded message --
From: Werner Lehmann
Date: Tue, Dec 10, 2013 at 9:03 AM
Subject: Re: Reloading stylesheets
To:
Cc: "openjfx-dev@openjdk.java.net"
Makes sense. Thanks!
On 10.12.2013 17:09, D
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. [...]
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 styl
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
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
> scen
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
visible
My code does:
> // Force CSS-Reloading
> if( isJavaFX2() ) {
> ReflectiveInvoke.onStyleManagerClass(scene);
> }
>
> scene.getStylesheets().clear();
> scene.getStylesheets().addAll(contentData.cssFiles);
A difference I see is that your stylesheets are on the Root-Container
whereas mine a
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 st
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 wrote:
> That doesn't work in 2.x because the C
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 r
Have you tried simply removing and re-adding the stylesheet to the scene?
Scott
On Tue, Dec 10, 2013 at 7:21 AM, Werner Lehmann <
lehm...@media-interactive.de> wrote:
> Hi,
>
> is there a way to reload previously loaded stylesheets (in FX2)?
>
> Currently I have to restart the application each
There is internal API:
com.sun.javafx.css.StyleManager.getInstance().reloadStylesheets(scene);
which is GONE in FX8 (but there it is not needed anyways) if you want to
support both platforms you need to use reflection to call it.
In e(fx)clipse preview I do:
> if( isJavaFX2() ) {
> Reflec
18 matches
Mail list logo