should scalafx.scene.Node have pseudoClassStateChanged ?

28 views
Skip to first unread message

David Bennion

unread,
Dec 6, 2014, 9:48:44 AM12/6/14
to scala...@googlegroups.com
Hey Guys,

I recently implemented a change listener (on TextFieldTreeCell -- but that is not really relevant).   One of the behaviors I wanted to do in the change listener was enable/disable a pseudoClass for the control.

if(is) delegate.pseudoClassStateChanged(highlighted,true) else delegate.pseudoClassStateChanged(highlighted,false)

I had to access the delegate directly for it and I just wondered things would be more elegant if it was exposed in the ScalaFX stuff.  It is a method call right on javafx.scene.Node, so pretty low in the hierarchy.

Forgive me if I don't really properly understand what is going on here.  I am still new to ScalaFx.

Cheers,

David.

Jarek

unread,
Dec 8, 2014, 12:15:22 PM12/8/14
to scala...@googlegroups.com
On Saturday, December 6, 2014 9:48:44 AM UTC-5, David Bennion wrote:
Hey Guys,

I recently implemented a change listener (on TextFieldTreeCell -- but that is not really relevant).   One of the behaviors I wanted to do in the change listener was enable/disable a pseudoClass for the control.

if(is) delegate.pseudoClassStateChanged(highlighted,true) else delegate.pseudoClassStateChanged(highlighted,false)

I had to access the delegate directly for it and I just wondered things would be more elegant if it was exposed in the ScalaFX stuff.  It is a method call right on javafx.scene.Node, so pretty low in the hierarchy.
 
`pseudoClassStateChanged` is one of the new methods in JavaFX 8 and is not currently implemented in ScalaFX. It is difficult to track all the new methods introduced in JavaFX. Please file it in the issue tracker for it.If you see some other methods missing please file too. Keep in mind though that, in general, methods are wrapped only if they will have signature different than that in JavaFX. In this case, the first argument is `PseudoClass` and would be a ScalaFX version in the wrapper.

Jarek
Reply all
Reply to author
Forward
0 new messages