/** * Get the child of the given parent at that index. * * @param parent The parent node to ask * @param index The position to get the child for * @return The TreeNode object at that position */ public Object getChild(Object parent, int index) { ToolGroupTreeNode treeNode = (ToolGroupTreeNode) parent; ToolGroupTreeNode kid = (ToolGroupTreeNode) treeNode.getChildAt(index); // check to see if the kids have been built. if (!kid.kidsLoaded) { buildChildren(kid); kid.kidsLoaded = true; } return kid; }