class SettingsDialogController {

  public void setRootCategories(Collection<Category> rootCategories) {
    rootItem.getChildren().clear();
    for (Category rootCategory : rootCategories) {
      TreeItem<Category> item = new TreeItem<>(rootCategory);
      addSubcategories(item);
      rootItem.getChildren().add(item);
    }
  }

}