RE: Constant resetting to initial-state when adding/remove styleclasses

2015-12-22 Thread Markus KARG
+1 -Original Message- From: openjfx-dev [mailto:openjfx-dev-boun...@openjdk.java.net] On Behalf Of Tom Schindl Sent: Dienstag, 22. Dezember 2015 07:16 To: openjfx-dev@openjdk.java.net Subject: Constant resetting to initial-state when adding/remove styleclasses Hi, While debugging some

RE: Constant resetting to initial-state when adding/remove styleclasses

2015-12-22 Thread Casall, Alexander
+1 I also vote for performance related optimizations From: Gerrit Grunwald Sent: 22.12.15, 07:55 To: Tom Schindl Cc: OpenJFX Subject: Re: Constant resetting to initial-state when adding/remove styleclasses Hi, I just can confirm what Tom wrote, figured that out some time ago when playing

Re: Constant resetting to initial-state when adding/remove styleclasses

2015-12-22 Thread Dr. Michael Paus
If anyone is counting these votes for better performance I'll add 1+ too :-) Am 22.12.15 um 07:15 schrieb Tom Schindl: Hi, While debugging some code I attached a listener to a property and noticed that whenever a style-class is added to the control or even worse somewhere in the parent

Re: Constant resetting to initial-state when adding/remove styleclasses

2015-12-22 Thread David Grieve
Adding/removing style-classes is simply bad practice. And not just in JavaFX. It is better to use pseudo-class state. When the style-class changes, the set of styles that match a node can, and is very likely to, change. The css implementation 're-applies' css to the node and its children by

Constant resetting to initial-state when adding/remove styleclasses

2015-12-21 Thread Tom Schindl
Hi, While debugging some code I attached a listener to a property and noticed that whenever a style-class is added to the control or even worse somewhere in the parent hierarchy that FX resets the value to its initial state (Node#reapplyCss & CssStyleHelper) only to set it back to it's real value

Re: Constant resetting to initial-state when adding/remove styleclasses

2015-12-21 Thread Gerrit Grunwald
Hi, I just can confirm what Tom wrote, figured that out some time ago when playing around with JavaFX on embedded. The focus on improving JavaFX should be on Performance and esp. CSS performance. You can make JavaFX fast but then you find yourself back in workarounds like in former Swing days.