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-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 false,

Re: Event for when a node gets shown on screen

2013-10-01 Thread Pedro Duque Vieira
Hi Anton, If I understand correctly (never used the Bindings.select method) you're listening to the node scene property and at the same time if the window that owns the scene is showing, that is, if the stage is visible on screen? Thanks, best regards, Hi Pedro, > you may try the following

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 ChangeListener() ); BT

Re: Event for when a node gets shown on screen

2013-10-01 Thread anton nashatyrev
Hi Pedro, you may try the following code: Bindings.select(node.sceneProperty(), "window", "showing").addListener(new ChangeListener() ); BTW, this way you could add the listener even when the node is not yet attached to any scene or window. Regards, Anton. On 29.09.2013 18:57, Ped

Re: Event for when a node gets shown on screen

2013-09-30 Thread Pedro Duque Vieira
Hi Pavel, Thanks. Just voted for it! :-) Best regards, > Hi Pedro, > you've hit our second oldest open feature request :-) > https://javafx-jira.kenai.com/browse/RT-129 > Regards, > Pavel -- Pedro Duque Vieira

Re: Event for when a node gets shown on screen

2013-09-30 Thread Pavel Safrata
Hi Pedro, you've hit our second oldest open feature request :-) https://javafx-jira.kenai.com/browse/RT-129 Regards, Pavel On 29.9.2013 16:57, Pedro Duque Vieira wrote: Hi, More than once or twice I had the need to do something when a node first gets shown on screen. Like for instance do some a

Event for when a node gets shown on screen

2013-09-29 Thread Pedro Duque Vieira
Hi, More than once or twice I had the need to do something when a node first gets shown on screen. Like for instance do some animation or setup some parameters which are only valid when the node is showing. For this reason I think there is a need for an event that is triggered when the node becom