How to select multiple checkBoxs?

0

I have a for loop, in which I create a new checkBox every time it goes through the loop. I'm adding these checks inside an item of treeTableView . I wanted to know how I could mark all the created checks.

How can I retrieve "the value (the checkBox)" to be able to select?

The creation of the check is as follows:

 for (int y = 0; y < lista.size(); y++) {
        CheckBoxW checkBoxW = new CheckBoxW();
        item = new TreeItem<?>(gp, new HBox(checkBoxW, label));
    }
    
asked by anonymous 19.09.2017 / 13:27

1 answer

1

The CheckBox class has method setSelected(Boolean) , with it you can change the status. to retrieve the value of checkBox you must use the following

      getTreeTableView().getTreeItem(i).getChildren()...

In this way, you will be able to cycle through every% of the TreeTableView .

    
19.09.2017 / 14:58