private String getTitle(CategoryItem categoryItem) { if (categoryItem == null) { return Constants.INSTANCE.CreateANewTopLevelCategory(); } else { return Constants.INSTANCE.CreateNewCategoryUnder0(categoryItem.getName()); } }
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; }