Proposal for improving nested controller interaction in JavaFX 2.2

Jonathan Giles jonathan.giles at
Tue Feb 21 23:34:01 PST 2012

> +1 This brings me to my next question. Once you bring a scene graph into
> memory, what utils/tools does the JavaFX offer or support for traversing
> the scene graph? FXML would benefit from having tools/utils that make it
> easier to query and traverse the scene graph. A DOM like API would be nice.
> A DOM would allow developers to do something like:
> Button submitButton scene.getById("submit_button"); //Gets the object with
> an == "submit_button"
> submitButton.onMouseClicked(clickHandler);
> XPath could be used to traverse and query the graph. The graph can be
> treated like XML and the graph is essentially a DOM instance.

I'll leave Rich to expand on this tomorrow (if he feels compelled), but 
given it appears you're closer to my time zone (NZ) than his (US) (or 
you just work late), I thought I'd quickly respond to point you to the 
Node.lookup(String selector) and Node.lookupAll(String selector) methods 

You can also find similar methods in Scene:

-- Jonathan

More information about the openjfx-dev mailing list