1780 |
} |
} |
1781 |
return foundPath; |
return foundPath; |
1782 |
} |
} |
1783 |
|
|
1784 |
|
/** |
1785 |
|
* Removes any paths in the current set of selected paths that are |
1786 |
|
* descendants of <code>path</code>. If <code>includePath</code> is |
1787 |
|
* set to <code>true</code> and <code>path</code> itself is selected, |
1788 |
|
* then it will be removed too. |
1789 |
|
* |
1790 |
|
* @param path the path from which selected descendants are to be |
1791 |
|
* removed |
1792 |
|
* @param includePath if <code>true</code> then <code>path</code> |
1793 |
|
* itself will also be remove if it's selected |
1794 |
|
* |
1795 |
|
* @return <code>true</code> if something has been removed, |
1796 |
|
* <code>false</code> otherwise |
1797 |
|
* |
1798 |
|
* @since 1.3 |
1799 |
|
*/ |
1800 |
|
protected boolean removeDescendantSelectedPaths(TreePath path, |
1801 |
|
boolean includeSelected) |
1802 |
|
{ |
1803 |
|
boolean removedSomething = false; |
1804 |
|
TreePath[] selected = getSelectionPaths(); |
1805 |
|
for (int index = 0; index < selected.length; index++) |
1806 |
|
{ |
1807 |
|
if ((selected[index] == path && includeSelected) |
1808 |
|
|| (selected[index].isDescendant(path))) |
1809 |
|
{ |
1810 |
|
removeSelectionPath(selected[index]); |
1811 |
|
removedSomething = true; |
1812 |
|
} |
1813 |
|
} |
1814 |
|
return removedSomething; |
1815 |
|
} |
1816 |
} |
} |