In C# I found a method that was pretty sweet that allowed you to get all the descendants and all of THEIR descendants from a specified control.
I\'m looking for a si
Unfortunately this won't get subnodes for most container components. If you try a TabPane
as parent, you'll find no children, but you can find tabs in it with getTabs()
. The same is with SplitPane
and other. So every container will require a specific approach.
You could use node.lookupAll("*")
, but it also doesn't look inside.
The solution could be a "Prototype" pattern - creating a meta class with common interface of getChildren()
method, which is realized in subclasses - one for each type.
Approach example is given here.