void (PropertyChangeEvent evt) { updateSelection(tree); if (evt.getOldValue() != null) { ((TreeSelectionModel)evt.getOldValue()).removeTreeSelectionListener(selectionListener); } if (evt.getNewValue() != null) { ((TreeSelectionModel)evt.getNewValue()).addTreeSelectionListener(selectionListener); } }