3560 |
{ |
{ |
3561 |
Object curr = path.getPathComponent(i); |
Object curr = path.getPathComponent(i); |
3562 |
TreePath currPath = new TreePath(getPathToRoot(curr, 0)); |
TreePath currPath = new TreePath(getPathToRoot(curr, 0)); |
3563 |
if (!treeModel.isLeaf(curr) && tree.isExpanded(currPath)) |
int numChild = treeModel.getChildCount(curr); |
3564 |
|
if (numChild > 0 && tree.isExpanded(currPath)) |
3565 |
{ |
{ |
3566 |
Rectangle bounds = getPathBounds(tree, currPath); |
Rectangle bounds = getPathBounds(tree, currPath); |
3567 |
Rectangle lastChildBounds = getPathBounds(tree, |
Rectangle lastChildBounds = getPathBounds(tree, |
3568 |
new TreePath(getPathToRoot( |
new TreePath(getPathToRoot( |
3569 |
treeModel.getChild(curr, |
treeModel.getChild(curr, numChild - 1), |
|
treeModel.getChildCount(curr) - 1), |
|
3570 |
0))); |
0))); |
3571 |
paintVerticalLine(g, tree, bounds.x + gap + 2, bounds.y + |
paintVerticalLine(g, tree, bounds.x + gap + 2, bounds.y + |
3572 |
bounds.height - 2, lastChildBounds.y + |
bounds.height - 2, lastChildBounds.y + |