2620 |
} |
} |
2621 |
|
|
2622 |
if (!mod.isLeaf(startNode) |
if (!mod.isLeaf(startNode) |
2623 |
&& tree.isExpanded(new TreePath(getPathToRoot(startNode, 0)))) |
&& tree.isExpanded(new TreePath(getPathToRoot(startNode, 0))) |
2624 |
|
&& mod.getChildCount(startNode) > 0) |
2625 |
{ |
{ |
2626 |
Object child = mod.getChild(startNode, 0); |
Object child = mod.getChild(startNode, 0); |
2627 |
if (child != null) |
if (child != null) |
2712 |
int max = mod.getChildCount(curr); |
int max = mod.getChildCount(curr); |
2713 |
if (tree.isExpanded(new TreePath(getPathToRoot(curr, 0)))) |
if (tree.isExpanded(new TreePath(getPathToRoot(curr, 0)))) |
2714 |
{ |
{ |
2715 |
for (int i = 0; i < max; ++i) |
for (int i = 0; i < max; i++) |
2716 |
{ |
{ |
2717 |
int indent = indentation + rightChildIndent; |
int indent = indentation + rightChildIndent; |
2718 |
if (!isRootVisible && depth == 0) |
if (!isRootVisible && depth == 0) |
2784 |
if (!node.equals(mod.getRoot())) |
if (!node.equals(mod.getRoot())) |
2785 |
ei.paintIcon(tree, g, indentation - rightChildIndent - 3, h); |
ei.paintIcon(tree, g, indentation - rightChildIndent - 3, h); |
2786 |
|
|
2787 |
for (int i = 0; i < max; ++i) |
for (int i = 0; i < max; i++) |
2788 |
{ |
{ |
2789 |
int indent = indentation + rightChildIndent; |
int indent = indentation + rightChildIndent; |
2790 |
if (depth == 0 && !tree.isRootVisible()) |
if (depth == 0 && !tree.isRootVisible()) |
2931 |
Object getNextNode(Object curr) |
Object getNextNode(Object curr) |
2932 |
{ |
{ |
2933 |
TreeModel mod = tree.getModel(); |
TreeModel mod = tree.getModel(); |
2934 |
if (mod.getChildCount(curr) != 0) |
if (mod.getChildCount(curr) > 0) |
2935 |
return mod.getChild(curr, 0); |
return mod.getChild(curr, 0); |
2936 |
|
|
2937 |
Object node = curr; |
Object node = curr; |
3014 |
|
|
3015 |
int index = mod.getIndexOfChild(parent, node) - 1; |
int index = mod.getIndexOfChild(parent, node) - 1; |
3016 |
|
|
3017 |
if (index < 0) |
if (index < 0 || index >= mod.getChildCount(parent)) |
3018 |
return null; |
return null; |
3019 |
|
|
3020 |
return mod.getChild(parent, index); |
return mod.getChild(parent, index); |