@Override public String getValue(TreeItem object) { String penImageResource = "<img src=\"" + JaggerResources.INSTANCE.getPencilImage().getSafeUri().asString() + "\" height=\"15\" width=\"15\">" + "<ins font-size='10px'>double click to edit</ins><br><br>"; String toShow; // Only for columns with data if (!field.equals(NAME)) { if (webClientProperties.isUserCommentEditAvailable()) { if (object.get(NAME).equals(USER_COMMENT)) { toShow = object.get(field).replaceAll("\n", "<br>"); return penImageResource + toShow; } } if (webClientProperties.isTagsAvailable()) { if (object.get(NAME).equals(SESSION_TAGS)) { toShow = object.get(field).replaceAll("\n", "<br>"); return penImageResource + toShow; } } } return object.get(field); }
public void removeTestInfo(TaskDataDto test) { String id = getTestItemId(test); TreeItem testItem = treeStore.findModelWithKey(id); if (testItem == null) { return; } TreeItem testInfo = treeStore.getFirstChild(testItem); if (testInfo != null && TEST_INFO.equals(testInfo.get(NAME))) removeWithParent(testInfo); }
private TreeItem getTestDescriptionItem(String descriptionStr) { for (TreeItem item : treeStore.getRootItems()) { if (descriptionStr.equals(item.get(NAME))) { return item; } } TreeItem description = new TreeItem(descriptionStr); description.put(NAME, descriptionStr); treeStore.add(description); return description; }
// clear everything but Session Information public void clearTreeStore() { for (TreeItem root : treeStore.getRootItems()) { if (root.getKey().equals(SESSION_INFO_ID)) { continue; } for (TreeItem test : treeStore.getChildren(root)) { for (TreeItem item : treeStore.getChildren(test)) { if (TEST_INFO.equals(item.get(NAME))) { continue; } removeWithParent(item); } } } }