@Override
      public void treeNodesRemoved(TreeModelEvent e) {
        if (e == null) {
          return;
        }
        TreePath parent = getPath(e);
        Object[] children = e.getChildren();
        if (children == null || parent == null) {
          return;
        }
        TreePath path;
        List<TreePath> toRemove = new ArrayList<>(Math.max(1, children.length));
        for (int counter = children.length - 1; counter >= 0; counter--) {
          path = parent.pathByAddingChild(children[counter]);
          if (expandedState.get(path) != null) {
            toRemove.add(path);
          }
        }
        if (!toRemove.isEmpty()) {
          removeDescendantToggledPaths(Collections.enumeration(toRemove));
        }
        TreeModel model = getModel();
        if (model == null || model.isLeaf(parent.getLastPathComponent())) {
          expandedState.remove(parent);
        }
        removeDescendantSelectedPaths(e);
      }
@Override
      public void treeNodesRemoved(TreeModelEvent e)