if (selectionModel != null)
  public void setSelectionModel(TreeSelectionModel model)  {    if (selectionModel == model)      return;    if (selectionModel != null)      selectionModel.removeTreeSelectionListener(selectionRedirector);    TreeSelectionModel oldValue = selectionModel;    selectionModel = model;    if (selectionModel != null)      selectionModel.addTreeSelectionListener(selectionRedirector);    firePropertyChange(SELECTION_MODEL_PROPERTY, oldValue, model);    revalidate();    repaint();  }