[API Review]: Node validation

Martin Sladecek martin.sladecek at oracle.com
Wed Jul 3 05:33:11 PDT 2013


JIRA: https://javafx-jira.kenai.com/browse/RT-31133

I propose a single method "public final void validate()" to be added to 
Node class. The validate method would ensure that the metrics (layout 
bounds) of the Node are valid with regards to the current scenegraph 
(CSS & layout).

Together with this change, Parent.layout() will be deprecated.

In my current implementation, validate() method works only if the Node 
is in a Scene. To make it work without a Scene, we'd need to do do some 
small adjustments to CSS (doesn't work with getScene() == null). But I'm 
not sure if such feature would be useful.


More information about the openjfx-dev mailing list