public void toggleCheckingPath(TreePath path){
  if (!isPathEnabled(path)) {
    return;
  }
  if (isPathChecked(path)) {
    removeCheckingPath(path);
  }
 else {
    addCheckingPath(path);
  }
}

public void toggleCheckingPath ( TreePath path ) { if ( ! isPathEnabled ( path ) ) { return ; } if ( isPathChecked ( path ) ) { removeCheckingPath ( path ) ; } else { addCheckingPath ( path ) ; } }
delegates to the current checkingmode the toggling style , using the strategy pattern .
