int (int row, int depth) { JTree tree = getTree(); if (tree == null) { return 0; } TreePath path = getPathForRow(tree, row); if (path == null) { return 0; } Control control = getControl(tree, path); return getPainter(tree).getRendererOffset(control, TreeUtil.getNodeDepth(tree, path), isLeaf(path.getLastPathComponent())); }