private void doCollapseChildren(List<Node> nodes) {
        for (Node node : nodes) {
            System.out.println(node);
            if(node instanceof TitledPane){
                TitledPane tPane = (TitledPane) node;
                tPane.setExpanded(false);
            }
        }
    }