code: public void check(TreePath tp, boolean check) {
          CheckedNode cn = nodesCheckingState.get(tp);
          cn.isSelected = check;
          if (check) {
              checkedPaths.add(tp);
          } else {
              checkedPaths.remove(tp);
          }
          updatePredecessorsAllChildrenSelectedState(tp);
      }
docs: Recursively checks/unchecks a subtree