I'm trying to get one event when selecting a box containing all the selected paths after clicking. TreeSelectionListener is always returning two events (add,remove in order) by default. Using setSingleEventMode(true) will through many events not one event.
- Code: Select all
CheckBoxTree.getCheckBoxTreeSelectionModel().addTreeSelectionListener(new TreeSelectionListener()
{
public void valueChanged(TreeSelectionEvent e)
{
}
});
Is there a way to make "remove event" before "add event". The reason is that I'm trying to manipulate a data structure and "remove even" is removing some nodes from the parent node even thought the parent is selected i.e. is i have this structure:
a--
|-b
|-c
a,b are selected
if you select c, "add event" will add the path "a" then "remove event" will remove "a-b". i have data structure that is adding/removing with any change in the tree. with this order the data for "a-b" will be lost even though it is selected.
i'm using the latest version 3.1.1