/** * Expands an item. * * @param itemId * the item id. * @return True if the expand operation succeeded */ public boolean expandItem(Object itemId) { boolean success = expandItem(itemId, true); markAsDirty(); return success; }
/** * Expands the items recursively * * Expands all the children recursively starting from an item. Operation * succeeds only if all expandable items are expanded. * * @param startItemId * @return True if the expand operation succeeded */ public boolean expandItemsRecursively(Object startItemId) { boolean result = true; // Initial stack final Stack<Object> todo = new Stack<Object>(); todo.add(startItemId); // Expands recursively while (!todo.isEmpty()) { final Object id = todo.pop(); if (areChildrenAllowed(id) && !expandItem(id, false)) { result = false; } if (hasChildren(id)) { todo.addAll(getChildren(id)); } } markAsDirty(); return result; }
final Object id = itemIdMapper.get(key); if (id != null) { expandItem(id, sendChildTree);
m_tree.expandItem(rrdGraphEntry.getNodeId()); m_tree.expandItem(rrdGraphEntry.getResourceTypeId()); m_tree.expandItem(rrdGraphEntry.getResourceId());