public void visit(Object parent, Object cell, Object previousSibling, int layer, int sibling) { CompactTreeNode parentNode = getTreeLayoutNode(parent); CompactTreeNode childNode = getTreeLayoutNode(cell); if (parentNode != null) { if (previousSibling == null) { parentNode.child = childNode; } else { CompactTreeNode prevNode = getTreeLayoutNode(previousSibling); prevNode.sibling = childNode; } } }
/** * Obtains the mapped node from the internal tree representation used from * the cell specified * * @param cell * the cell whose <code>TreeLayoutNode</code> is to be found * @return the internal node representation of the specified cell */ protected CompactTreeNode getTreeLayoutNode(Object cell) { if (cell != null) { return getTreeLayoutNode(cell, true); } return null; }
layoutTree(getTreeLayoutNode(graph.getRootAt(i))); dispatchResult(nodes.values());