void (ListSelectionListener listSelectionListener) { myTreeView.getSelectionModel().addListSelectionListener(listSelectionListener); myFlatView.getSelectionModel().addListSelectionListener(listSelectionListener); }