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
This works for me:
public class FXUtil {
public static final List getAllChildren(final Parent parent) {
final List result = new LinkedList<>();
if (parent != null) {
final List childrenLvl1 = parent.getChildrenUnmodifiable();
result.addAll(childrenLvl1);
final List childrenLvl2 =
childrenLvl1.stream()
.filter(c -> c instanceof Parent)
.map(c -> (Parent) c)
.map(FXUtil::getAllChildren)
.flatMap(List::stream)
.collect(Collectors.toList());
result.addAll(childrenLvl2);
}
return result;
}
}