1733 |
if (e.isControlDown()) |
if (e.isControlDown()) |
1734 |
tree.setLeadSelectionPath(newPath); |
tree.setLeadSelectionPath(newPath); |
1735 |
else if (!mod.isLeaf(next) && e.isShiftDown()) |
else if (!mod.isLeaf(next) && e.isShiftDown()) |
1736 |
{ |
BasicTreeUI.this.tree.expandPath(newPath); |
|
BasicTreeUI.this.tree.expandPath(newPath); |
|
|
try |
|
|
{ |
|
|
BasicTreeUI.this.tree.fireTreeWillExpand(newPath); |
|
|
} |
|
|
catch (ExpandVetoException ev) |
|
|
{ |
|
|
} |
|
|
BasicTreeUI.this.tree.fireTreeExpanded(newPath); |
|
|
} |
|
1737 |
} |
} |
1738 |
} |
} |
1739 |
// UP, KP_UP |
// UP, KP_UP |
1751 |
if (e.isControlDown()) |
if (e.isControlDown()) |
1752 |
tree.setLeadSelectionPath(newPath); |
tree.setLeadSelectionPath(newPath); |
1753 |
else if (!mod.isLeaf(prev) && e.isShiftDown()) |
else if (!mod.isLeaf(prev) && e.isShiftDown()) |
1754 |
{ |
BasicTreeUI.this.tree.expandPath(newPath); |
|
BasicTreeUI.this.tree.expandPath(newPath); |
|
|
try |
|
|
{ |
|
|
BasicTreeUI.this.tree.fireTreeWillExpand(newPath); |
|
|
} |
|
|
catch (ExpandVetoException ev) |
|
|
{ |
|
|
} |
|
|
BasicTreeUI.this.tree.fireTreeExpanded(newPath); |
|
|
} |
|
1755 |
} |
} |
1756 |
} |
} |
1757 |
// LEFT, KP_LEFT |
// LEFT, KP_LEFT |
1762 |
Object p = getParent(mod.getRoot(), last); |
Object p = getParent(mod.getRoot(), last); |
1763 |
|
|
1764 |
if (!mod.isLeaf(last) && BasicTreeUI.this.tree.isExpanded(path)) |
if (!mod.isLeaf(last) && BasicTreeUI.this.tree.isExpanded(path)) |
1765 |
{ |
BasicTreeUI.this.tree.collapsePath(path); |
|
BasicTreeUI.this.tree.collapsePath(path); |
|
|
try |
|
|
{ |
|
|
BasicTreeUI.this.tree.fireTreeWillCollapse(path); |
|
|
} |
|
|
catch (ExpandVetoException ev) |
|
|
{ |
|
|
} |
|
|
BasicTreeUI.this.tree.fireTreeCollapsed(path); |
|
|
} |
|
1766 |
else if (p != null) |
else if (p != null) |
1767 |
BasicTreeUI.this.selectPath(BasicTreeUI.this.tree, |
BasicTreeUI.this.selectPath(BasicTreeUI.this.tree, |
1768 |
new TreePath(getPathToRoot(p, 0))); |
new TreePath(getPathToRoot(p, 0))); |
1774 |
TreePath path = new TreePath(getPathToRoot(last, 0)); |
TreePath path = new TreePath(getPathToRoot(last, 0)); |
1775 |
|
|
1776 |
if (!mod.isLeaf(last) && BasicTreeUI.this.tree.isCollapsed(path)) |
if (!mod.isLeaf(last) && BasicTreeUI.this.tree.isCollapsed(path)) |
1777 |
{ |
BasicTreeUI.this.tree.expandPath(path); |
|
BasicTreeUI.this.tree.expandPath(path); |
|
|
try |
|
|
{ |
|
|
BasicTreeUI.this.tree.fireTreeWillExpand(path); |
|
|
} |
|
|
catch (ExpandVetoException ev) |
|
|
{ |
|
|
} |
|
|
BasicTreeUI.this.tree.fireTreeExpanded(path); |
|
|
} |
|
1778 |
else |
else |
1779 |
{ |
{ |
1780 |
Object next = BasicTreeUI.this.getNextVisibleNode(last); |
Object next = BasicTreeUI.this.getNextVisibleNode(last); |
1795 |
if (!mod.isLeaf(last)) |
if (!mod.isLeaf(last)) |
1796 |
{ |
{ |
1797 |
if (BasicTreeUI.this.tree.isExpanded(path)) |
if (BasicTreeUI.this.tree.isExpanded(path)) |
1798 |
{ |
BasicTreeUI.this.tree.collapsePath(path); |
|
BasicTreeUI.this.tree.collapsePath(path); |
|
|
try |
|
|
{ |
|
|
BasicTreeUI.this.tree.fireTreeWillCollapse(path); |
|
|
} |
|
|
catch (ExpandVetoException ev) |
|
|
{ |
|
|
} |
|
|
BasicTreeUI.this.tree.fireTreeCollapsed(path); |
|
|
} |
|
1799 |
else |
else |
1800 |
{ |
BasicTreeUI.this.tree.expandPath(path); |
|
BasicTreeUI.this.tree.expandPath(path); |
|
|
try |
|
|
{ |
|
|
BasicTreeUI.this.tree.fireTreeWillExpand(path); |
|
|
} |
|
|
catch (ExpandVetoException ev) |
|
|
{ |
|
|
} |
|
|
BasicTreeUI.this.tree.fireTreeExpanded(path); |
|
|
} |
|
1801 |
} |
} |
1802 |
} |
} |
1803 |
} |
} |
1953 |
lastClicked = null; |
lastClicked = null; |
1954 |
BasicTreeUI.this.tree.getSelectionModel().clearSelection(); |
BasicTreeUI.this.tree.getSelectionModel().clearSelection(); |
1955 |
if (BasicTreeUI.this.tree.isExpanded(path)) |
if (BasicTreeUI.this.tree.isExpanded(path)) |
1956 |
{ |
BasicTreeUI.this.tree.collapsePath(path); |
|
BasicTreeUI.this.tree.collapsePath(path); |
|
|
try |
|
|
{ |
|
|
BasicTreeUI.this.tree.fireTreeWillCollapse(path); |
|
|
} |
|
|
catch (ExpandVetoException ev) |
|
|
{ |
|
|
} |
|
|
BasicTreeUI.this.tree.fireTreeCollapsed(path); |
|
|
} |
|
1957 |
else |
else |
1958 |
{ |
BasicTreeUI.this.tree.expandPath(path); |
|
BasicTreeUI.this.tree.expandPath(path); |
|
|
try |
|
|
{ |
|
|
BasicTreeUI.this.tree.fireTreeWillExpand(path); |
|
|
} |
|
|
catch (ExpandVetoException ev) |
|
|
{ |
|
|
} |
|
|
BasicTreeUI.this.tree.fireTreeExpanded(path); |
|
|
} |
|
1959 |
} |
} |
1960 |
|
|
1961 |
BasicTreeUI.this.selectPath(BasicTreeUI.this.tree, path); |
BasicTreeUI.this.selectPath(BasicTreeUI.this.tree, path); |
2540 |
} |
} |
2541 |
|
|
2542 |
if (!mod.isLeaf(startNode) |
if (!mod.isLeaf(startNode) |
2543 |
&& tree.isExpanded(new TreePath(getPathToRoot(startNode, 0))) |
&& tree.isExpanded(new TreePath(getPathToRoot(startNode, 0))) |
2544 |
&& mod.getChildCount(startNode) > 0) |
&& mod.getChildCount(startNode) > 0) |
2545 |
{ |
{ |
2546 |
Object child = mod.getChild(startNode, 0); |
Object child = mod.getChild(startNode, 0); |