private String getTitle(CategoryItem categoryItem) {
   if (categoryItem == null) {
     return Constants.INSTANCE.CreateANewTopLevelCategory();
   } else {
     return Constants.INSTANCE.CreateNewCategoryUnder0(categoryItem.getName());
   }
 }
Пример #2
0
  public TreeItem buildTreeItem(final CategoryItem category) {
    final TreeItem it = new TreeItem();
    it.setHTML(
        AbstractImagePrototype.create(ImageResources.INSTANCE.categorySmall()).getHTML()
            + h(category.getName()));
    it.setUserObject(category);

    return it;
  }