Re: Event for when a node gets shown on screen

2013-10-02 Thread anton nashatyrev
Hi Pedro, that binding is 'watching' for the whole chain of properties and is changed to 'true' only when the node is attached to the scene, the scene is attached to the window and the window isShowing() = true. Vice verse it changed to 'false' if any of the above conditions becomes

Re: Event for when a node gets shown on screen

2013-10-02 Thread Pedro Duque Vieira
Yap, just what I thought. Sounds like a great idea. I'll give it a try. Thanks Anton, best regards, On Wed, Oct 2, 2013 at 11:58 AM, anton nashatyrev anton.nashaty...@oracle.com wrote: Hi Pedro, that binding is 'watching' for the whole chain of properties and is changed to 'true'

Re: Event for when a node gets shown on screen

2013-10-01 Thread Martin Sladecek
That would work, except you need to hard-ref the binding otherwise it might get GCed. -Martin On 10/01/2013 02:53 PM, anton nashatyrev wrote: Hi Pedro, you may try the following code: Bindings.select(node.sceneProperty(), window, showing).addListener(new ChangeListenerBoolean() );