2046 |
{ |
{ |
2047 |
if (path == null) |
if (path == null) |
2048 |
return; |
return; |
2049 |
|
|
2050 |
|
Object[] oPath = path.getPath(); |
2051 |
|
TreePath temp = new TreePath(oPath[0]); |
2052 |
|
boolean stop = false; |
2053 |
|
int i = 1; |
2054 |
|
while (!stop) |
2055 |
|
{ |
2056 |
|
while (isVisible(temp)) |
2057 |
|
if (i < oPath.length) |
2058 |
|
temp = temp.pathByAddingChild(oPath[i++]); |
2059 |
|
else |
2060 |
|
{ |
2061 |
|
stop = true; |
2062 |
|
break; |
2063 |
|
} |
2064 |
|
makeVisible(temp); |
2065 |
|
} |
2066 |
Rectangle rect = getPathBounds(path); |
Rectangle rect = getPathBounds(path); |
|
|
|
|
if (rect == null) |
|
|
return; |
|
|
|
|
2067 |
scrollRectToVisible(rect); |
scrollRectToVisible(rect); |
2068 |
|
setSelectionPath(temp); |
2069 |
} |
} |
2070 |
|
|
2071 |
public void scrollRowToVisible(int row) |
public void scrollRowToVisible(int row) |