44 |
import java.awt.Font; |
import java.awt.Font; |
45 |
import java.awt.FontMetrics; |
import java.awt.FontMetrics; |
46 |
import java.awt.Graphics; |
import java.awt.Graphics; |
47 |
|
import java.awt.Insets; |
48 |
import java.awt.Point; |
import java.awt.Point; |
49 |
import java.awt.Rectangle; |
import java.awt.Rectangle; |
50 |
import java.awt.event.ActionEvent; |
import java.awt.event.ActionEvent; |
63 |
import java.awt.event.MouseMotionListener; |
import java.awt.event.MouseMotionListener; |
64 |
import java.beans.PropertyChangeEvent; |
import java.beans.PropertyChangeEvent; |
65 |
import java.beans.PropertyChangeListener; |
import java.beans.PropertyChangeListener; |
66 |
|
import java.util.Enumeration; |
67 |
import java.util.Hashtable; |
import java.util.Hashtable; |
68 |
|
|
69 |
import javax.swing.AbstractAction; |
import javax.swing.AbstractAction; |
98 |
import javax.swing.tree.AbstractLayoutCache; |
import javax.swing.tree.AbstractLayoutCache; |
99 |
import javax.swing.tree.DefaultTreeCellEditor; |
import javax.swing.tree.DefaultTreeCellEditor; |
100 |
import javax.swing.tree.DefaultTreeCellRenderer; |
import javax.swing.tree.DefaultTreeCellRenderer; |
|
import javax.swing.tree.ExpandVetoException; |
|
101 |
import javax.swing.tree.FixedHeightLayoutCache; |
import javax.swing.tree.FixedHeightLayoutCache; |
102 |
import javax.swing.tree.TreeCellEditor; |
import javax.swing.tree.TreeCellEditor; |
103 |
import javax.swing.tree.TreeCellRenderer; |
import javax.swing.tree.TreeCellRenderer; |
175 |
|
|
176 |
/** Size needed to completely display all the nodes. */ |
/** Size needed to completely display all the nodes. */ |
177 |
protected Dimension preferredSize; |
protected Dimension preferredSize; |
178 |
|
|
179 |
|
/** Minimum size needed to completely display all the nodes. */ |
180 |
|
protected Dimension preferredMinSize; |
181 |
|
|
182 |
/** Is the preferredSize valid? */ |
/** Is the preferredSize valid? */ |
183 |
protected boolean validCachedPreferredSize; |
protected boolean validCachedPreferredSize; |
229 |
protected boolean editorHasDifferentSize; |
protected boolean editorHasDifferentSize; |
230 |
|
|
231 |
/** The action listener for the editor's Timer. */ |
/** The action listener for the editor's Timer. */ |
232 |
private Timer editorTimer = new EditorUpdateTimer(); |
Timer editorTimer = new EditorUpdateTimer(); |
233 |
|
|
234 |
/** The new value of the node after editing. */ |
/** The new value of the node after editing. */ |
235 |
private Object newVal; |
Object newVal; |
236 |
|
|
237 |
/** The action bound to KeyStrokes. */ |
/** The action bound to KeyStrokes. */ |
238 |
private TreeAction action; |
TreeAction action; |
239 |
|
|
240 |
/** Boolean to keep track of editing. */ |
/** Boolean to keep track of editing. */ |
241 |
private boolean isEditing; |
boolean isEditing; |
242 |
|
|
243 |
|
/** The bounds of the current cell. */ |
244 |
|
Rectangle bounds; |
245 |
|
|
246 |
/** Listeners */ |
/** Listeners */ |
247 |
private PropertyChangeListener propertyChangeListener; |
private PropertyChangeListener propertyChangeListener; |
|
|
|
248 |
private FocusListener focusListener; |
private FocusListener focusListener; |
|
|
|
249 |
private TreeSelectionListener treeSelectionListener; |
private TreeSelectionListener treeSelectionListener; |
|
|
|
250 |
private MouseInputListener mouseInputListener; |
private MouseInputListener mouseInputListener; |
|
|
|
251 |
private KeyListener keyListener; |
private KeyListener keyListener; |
|
|
|
252 |
private PropertyChangeListener selectionModelPropertyChangeListener; |
private PropertyChangeListener selectionModelPropertyChangeListener; |
|
|
|
253 |
private ComponentListener componentListener; |
private ComponentListener componentListener; |
|
|
|
254 |
private CellEditorListener cellEditorListener; |
private CellEditorListener cellEditorListener; |
|
|
|
255 |
private TreeExpansionListener treeExpansionListener; |
private TreeExpansionListener treeExpansionListener; |
|
|
|
256 |
private TreeModelListener treeModelListener; |
private TreeModelListener treeModelListener; |
257 |
|
|
258 |
/** |
/** |
454 |
protected void setCellRenderer(TreeCellRenderer tcr) |
protected void setCellRenderer(TreeCellRenderer tcr) |
455 |
{ |
{ |
456 |
currentCellRenderer = tcr; |
currentCellRenderer = tcr; |
|
tree.setCellRenderer(tcr); |
|
457 |
updateRenderer(); |
updateRenderer(); |
458 |
} |
} |
459 |
|
|
622 |
{ |
{ |
623 |
Object cell = path.getLastPathComponent(); |
Object cell = path.getLastPathComponent(); |
624 |
|
|
625 |
TreeModel mod = tree.getModel(); |
if (treeModel != null) |
|
if (mod != null) |
|
626 |
{ |
{ |
627 |
Object root = mod.getRoot(); |
Object root = treeModel.getRoot(); |
628 |
if (!tree.isRootVisible() && tree.isExpanded(new TreePath(root))) |
if (!tree.isRootVisible() && tree.isExpanded(new TreePath(root))) |
629 |
root = getNextNode(root); |
root = getNextNode(root); |
630 |
|
|
631 |
Point loc = getCellLocation(0, 0, tree, mod, cell, root); |
Point loc = getCellLocation(0, 0, tree, treeModel, cell, root); |
632 |
return getCellBounds(loc.x, loc.y, cell); |
return getCellBounds(loc.x, loc.y, cell); |
633 |
} |
} |
634 |
} |
} |
646 |
*/ |
*/ |
647 |
public TreePath getPathForRow(JTree tree, int row) |
public TreePath getPathForRow(JTree tree, int row) |
648 |
{ |
{ |
649 |
TreeModel mod = tree.getModel(); |
if (treeModel != null) |
|
if (mod != null) |
|
650 |
{ |
{ |
651 |
Object node = mod.getRoot(); |
Object node = treeModel.getRoot(); |
652 |
if (!tree.isRootVisible() |
if (!tree.isRootVisible() |
653 |
&& tree.isExpanded(new TreePath(getPathToRoot(node, 0)))) |
&& tree.isExpanded(new TreePath(getPathToRoot(node, 0)))) |
654 |
node = getNextNode(node); |
node = getNextNode(node); |
700 |
*/ |
*/ |
701 |
public int getRowCount(JTree tree) |
public int getRowCount(JTree tree) |
702 |
{ |
{ |
|
TreeModel mod = tree.getModel(); |
|
703 |
int count = 0; |
int count = 0; |
704 |
if (mod != null) |
if (treeModel != null) |
705 |
{ |
{ |
706 |
Object node = mod.getRoot(); |
Object node = treeModel.getRoot(); |
707 |
if (!tree.isRootVisible() |
if (!tree.isRootVisible() |
708 |
&& tree.isExpanded(new TreePath((getPathToRoot(node, 0))))) |
&& tree.isExpanded(new TreePath((getPathToRoot(node, 0))))) |
709 |
node = getNextNode(node); |
node = getNextNode(node); |
822 |
*/ |
*/ |
823 |
protected void prepareForUIInstall() |
protected void prepareForUIInstall() |
824 |
{ |
{ |
|
// FIXME: not implemented |
|
825 |
} |
} |
826 |
|
|
827 |
/** |
/** |
830 |
*/ |
*/ |
831 |
protected void completeUIInstall() |
protected void completeUIInstall() |
832 |
{ |
{ |
|
// FIXME: not implemented |
|
833 |
} |
} |
834 |
|
|
835 |
/** |
/** |
838 |
*/ |
*/ |
839 |
protected void completeUIUninstall() |
protected void completeUIUninstall() |
840 |
{ |
{ |
|
// FIXME: not implemented |
|
841 |
} |
} |
842 |
|
|
843 |
/** |
/** |
845 |
*/ |
*/ |
846 |
protected void installComponents() |
protected void installComponents() |
847 |
{ |
{ |
848 |
// FIXME: not implemented |
currentCellRenderer = createDefaultCellRenderer(); |
849 |
|
rendererPane = createCellRendererPane(); |
850 |
|
createdRenderer = true; |
851 |
|
setCellRenderer(currentCellRenderer); |
852 |
} |
} |
853 |
|
|
854 |
/** |
/** |
859 |
*/ |
*/ |
860 |
protected AbstractLayoutCache.NodeDimensions createNodeDimensions() |
protected AbstractLayoutCache.NodeDimensions createNodeDimensions() |
861 |
{ |
{ |
862 |
// FIXME: not implemented |
return new NodeDimensionsHandler(); |
|
return null; |
|
863 |
} |
} |
864 |
|
|
865 |
/** |
/** |
1037 |
TreeCellEditor tce = tree.getCellEditor(); |
TreeCellEditor tce = tree.getCellEditor(); |
1038 |
if (tce != null) |
if (tce != null) |
1039 |
tce.removeCellEditorListener(cellEditorListener); |
tce.removeCellEditorListener(cellEditorListener); |
1040 |
TreeModel tm = tree.getModel(); |
if (treeModel != null) |
1041 |
if (tm != null) |
treeModel.removeTreeModelListener(treeModelListener); |
|
tm.removeTreeModelListener(treeModelListener); |
|
1042 |
} |
} |
1043 |
|
|
1044 |
/** |
/** |
1053 |
*/ |
*/ |
1054 |
protected void uninstallComponents() |
protected void uninstallComponents() |
1055 |
{ |
{ |
1056 |
// FIXME: not implemented |
currentCellRenderer = null; |
1057 |
|
rendererPane = null; |
1058 |
|
createdRenderer = false; |
1059 |
|
setCellRenderer(currentCellRenderer); |
1060 |
} |
} |
1061 |
|
|
1062 |
/** |
/** |
1067 |
*/ |
*/ |
1068 |
protected int getVerticalLegBuffer() |
protected int getVerticalLegBuffer() |
1069 |
{ |
{ |
1070 |
// FIXME: not implemented |
return getRowHeight() / 2; |
|
return 0; |
|
1071 |
} |
} |
1072 |
|
|
1073 |
/** |
/** |
1079 |
*/ |
*/ |
1080 |
protected int getHorizontalLegBuffer() |
protected int getHorizontalLegBuffer() |
1081 |
{ |
{ |
1082 |
// FIXME: not implemented |
return rightChildIndent / 2; |
|
return 0; |
|
1083 |
} |
} |
1084 |
|
|
1085 |
/** |
/** |
1086 |
* Make all the nodes that are expanded in JTree expanded in LayoutCache. This |
* Make all the nodes that are expanded in JTree expanded in LayoutCache. This |
1087 |
* invokes update ExpandedDescendants with the root path. |
* invokes updateExpandedDescendants with the root path. |
1088 |
*/ |
*/ |
1089 |
protected void updateLayoutCacheExpandedNodes() |
protected void updateLayoutCacheExpandedNodes() |
1090 |
{ |
{ |
1091 |
// FIXME: not implemented |
if (treeModel != null) |
1092 |
|
updateExpandedDescendants(new TreePath(getPathToRoot(treeModel. |
1093 |
|
getRoot(), 0))); |
1094 |
} |
} |
1095 |
|
|
1096 |
/** |
/** |
1103 |
*/ |
*/ |
1104 |
protected void updateExpandedDescendants(TreePath path) |
protected void updateExpandedDescendants(TreePath path) |
1105 |
{ |
{ |
1106 |
// FIXME: not implemented |
Enumeration expanded = tree.getExpandedDescendants(path); |
1107 |
|
while (expanded.hasMoreElements()) |
1108 |
|
treeState.setExpandedState(((TreePath) expanded.nextElement()), true); |
1109 |
} |
} |
1110 |
|
|
1111 |
/** |
/** |
1125 |
*/ |
*/ |
1126 |
protected void updateDepthOffset() |
protected void updateDepthOffset() |
1127 |
{ |
{ |
1128 |
// FIXME: not implemented |
depthOffset += getVerticalLegBuffer(); |
1129 |
} |
} |
1130 |
|
|
1131 |
/** |
/** |
1145 |
*/ |
*/ |
1146 |
protected void updateRenderer() |
protected void updateRenderer() |
1147 |
{ |
{ |
1148 |
// FIXME: not implemented |
if (tree != null) |
1149 |
|
tree.setCellRenderer(currentCellRenderer); |
1150 |
} |
} |
1151 |
|
|
1152 |
/** |
/** |
1164 |
*/ |
*/ |
1165 |
protected void updateSize() |
protected void updateSize() |
1166 |
{ |
{ |
1167 |
// FIXME: not implemented |
preferredSize = null; |
1168 |
|
updateCachedPreferredSize(); |
1169 |
|
tree.treeDidChange(); |
1170 |
} |
} |
1171 |
|
|
1172 |
/** |
/** |
1219 |
leftChildIndent = defaults.getInt("Tree.leftChildIndent"); |
leftChildIndent = defaults.getInt("Tree.leftChildIndent"); |
1220 |
setRowHeight(defaults.getInt("Tree.rowHeight")); |
setRowHeight(defaults.getInt("Tree.rowHeight")); |
1221 |
tree.requestFocusInWindow(false); |
tree.requestFocusInWindow(false); |
1222 |
|
tree.setScrollsOnExpand(defaults.getBoolean("Tree.scrollsOnExpand")); |
1223 |
|
setExpandedIcon(defaults.getIcon("Tree.expandedIcon")); |
1224 |
|
setCollapsedIcon(defaults.getIcon("Tree.collapsedIcon")); |
1225 |
} |
} |
1226 |
|
|
1227 |
/** |
/** |
1332 |
tree = (JTree) c; |
tree = (JTree) c; |
1333 |
installDefaults(); |
installDefaults(); |
1334 |
|
|
1335 |
currentCellRenderer = createDefaultCellRenderer(); |
installComponents(); |
|
rendererPane = createCellRendererPane(); |
|
|
createdRenderer = true; |
|
1336 |
|
|
1337 |
setCellEditor(createDefaultCellEditor()); |
setCellEditor(createDefaultCellEditor()); |
1338 |
createdCellEditor = true; |
createdCellEditor = true; |
1375 |
uninstallKeyboardActions(); |
uninstallKeyboardActions(); |
1376 |
uninstallListeners(); |
uninstallListeners(); |
1377 |
tree = null; |
tree = null; |
1378 |
|
uninstallComponents(); |
1379 |
completeUIUninstall(); |
completeUIUninstall(); |
1380 |
} |
} |
1381 |
|
|
1396 |
{ |
{ |
1397 |
JTree tree = (JTree) c; |
JTree tree = (JTree) c; |
1398 |
|
|
1399 |
TreeModel mod = tree.getModel(); |
if (treeModel != null) |
|
|
|
|
if (mod != null) |
|
1400 |
{ |
{ |
1401 |
Object root = mod.getRoot(); |
Object root = treeModel.getRoot(); |
1402 |
|
|
1403 |
if (!tree.isRootVisible()) |
if (!tree.isRootVisible()) |
1404 |
tree.expandPath(new TreePath(root)); |
tree.expandPath(new TreePath(root)); |
1405 |
|
|
1406 |
paintRecursive(g, 0, 0, 0, 0, tree, mod, root); |
paintRecursive(g, 0, 0, 0, 0, tree, treeModel, root); |
1407 |
|
|
1408 |
if (hasControlIcons()) |
if (hasControlIcons()) |
1409 |
paintControlIcons(g, 0, 0, 0, 0, tree, mod, root); |
paintControlIcons(g, 0, 0, 0, 0, tree, treeModel, root); |
1410 |
} |
} |
1411 |
} |
} |
1412 |
|
|
1420 |
*/ |
*/ |
1421 |
protected void ensureRowsAreVisible(int beginRow, int endRow) |
protected void ensureRowsAreVisible(int beginRow, int endRow) |
1422 |
{ |
{ |
1423 |
// FIXME: not implemented |
if (beginRow < endRow) |
1424 |
|
{ |
1425 |
|
int temp = endRow; |
1426 |
|
endRow = beginRow; |
1427 |
|
beginRow = temp; |
1428 |
|
} |
1429 |
|
|
1430 |
|
for (int i = beginRow; i < endRow; i++) |
1431 |
|
{ |
1432 |
|
TreePath path = getPathForRow(tree, i); |
1433 |
|
if (!tree.isVisible(path)) |
1434 |
|
tree.makeVisible(path); |
1435 |
|
} |
1436 |
} |
} |
1437 |
|
|
1438 |
/** |
/** |
1485 |
public Dimension getPreferredSize(JComponent c, boolean checkConsistancy) |
public Dimension getPreferredSize(JComponent c, boolean checkConsistancy) |
1486 |
{ |
{ |
1487 |
// FIXME: checkConsistancy not implemented, c not used |
// FIXME: checkConsistancy not implemented, c not used |
|
TreeModel model = tree.getModel(); |
|
1488 |
int maxWidth = 0; |
int maxWidth = 0; |
1489 |
int count = 0; |
int count = 0; |
1490 |
if (model != null) |
if (treeModel != null) |
1491 |
{ |
{ |
1492 |
Object node = model.getRoot(); |
Object node = treeModel.getRoot(); |
1493 |
if (node != null) |
if (node != null) |
1494 |
{ |
{ |
1495 |
maxWidth = (int) (getCellBounds(0, 0, node).getWidth()); |
maxWidth = (int) (getCellBounds(0, 0, node).getWidth()); |
1517 |
*/ |
*/ |
1518 |
public Dimension getMinimumSize(JComponent c) |
public Dimension getMinimumSize(JComponent c) |
1519 |
{ |
{ |
1520 |
// FIXME: not implemented |
Dimension min = getPreferredMinSize(); |
1521 |
return getPreferredSize(c); |
if (min == null) |
1522 |
|
return new Dimension(); |
1523 |
|
return min; |
1524 |
} |
} |
1525 |
|
|
1526 |
/** |
/** |
1533 |
*/ |
*/ |
1534 |
public Dimension getMaximumSize(JComponent c) |
public Dimension getMaximumSize(JComponent c) |
1535 |
{ |
{ |
1536 |
// FIXME: not implemented |
if (c instanceof JTree) |
1537 |
return getPreferredSize(c); |
return ((JTree) c).getPreferredSize(); |
1538 |
|
return new Dimension(); |
1539 |
} |
} |
1540 |
|
|
1541 |
/** |
/** |
1579 |
} |
} |
1580 |
|
|
1581 |
if (messageTree) |
if (messageTree) |
1582 |
tree.getModel().valueForPathChanged(tree.getLeadSelectionPath(), newVal); |
treeModel.valueForPathChanged(tree.getLeadSelectionPath(), newVal); |
1583 |
} |
} |
1584 |
|
|
1585 |
/** |
/** |
1648 |
protected void checkForClickInExpandControl(TreePath path, int mouseX, |
protected void checkForClickInExpandControl(TreePath path, int mouseX, |
1649 |
int mouseY) |
int mouseY) |
1650 |
{ |
{ |
1651 |
// FIXME: not implemented |
if (isLocationInExpandControl(path, mouseX, mouseY)) |
1652 |
|
toggleExpandState(path); |
1653 |
} |
} |
1654 |
|
|
1655 |
/** |
/** |
1670 |
protected boolean isLocationInExpandControl(TreePath path, int mouseX, |
protected boolean isLocationInExpandControl(TreePath path, int mouseX, |
1671 |
int mouseY) |
int mouseY) |
1672 |
{ |
{ |
1673 |
// FIXME: not implemented |
boolean cntlClick = false; |
1674 |
return false; |
int row = getRowForPath(tree, path); |
1675 |
|
if (!isLeaf(row)) |
1676 |
|
{ |
1677 |
|
if (bounds == null) |
1678 |
|
bounds = getPathBounds(tree, path); |
1679 |
|
if (tree.isExpanded(path) && expandedIcon != null) |
1680 |
|
bounds.x -= expandedIcon.getIconWidth() - 4; |
1681 |
|
else if (collapsedIcon != null) |
1682 |
|
bounds.x -= collapsedIcon.getIconWidth() - 4; |
1683 |
|
|
1684 |
|
Icon controlIcon = getCurrentControlIcon(path); |
1685 |
|
if (controlIcon != null && (mouseX < bounds.x) |
1686 |
|
&& (mouseX > (bounds.x - controlIcon.getIconWidth()))) |
1687 |
|
cntlClick = true; |
1688 |
|
} |
1689 |
|
return cntlClick; |
1690 |
} |
} |
1691 |
|
|
1692 |
/** |
/** |
1702 |
*/ |
*/ |
1703 |
protected void handleExpandControlClick(TreePath path, int mouseX, int mouseY) |
protected void handleExpandControlClick(TreePath path, int mouseX, int mouseY) |
1704 |
{ |
{ |
1705 |
// FIXME: not implemented |
toggleExpandState(path); |
1706 |
} |
} |
1707 |
|
|
1708 |
/** |
/** |
1716 |
*/ |
*/ |
1717 |
protected void toggleExpandState(TreePath path) |
protected void toggleExpandState(TreePath path) |
1718 |
{ |
{ |
1719 |
// FIXME: not implemented |
if (tree.isExpanded(path)) |
1720 |
|
tree.collapsePath(path); |
1721 |
|
else |
1722 |
|
tree.expandPath(path); |
1723 |
} |
} |
1724 |
|
|
1725 |
/** |
/** |
1733 |
*/ |
*/ |
1734 |
protected boolean isToggleSelectionEvent(MouseEvent event) |
protected boolean isToggleSelectionEvent(MouseEvent event) |
1735 |
{ |
{ |
1736 |
// FIXME: not implemented |
return (tree.getSelectionModel().getSelectionMode() == |
1737 |
return false; |
TreeSelectionModel.SINGLE_TREE_SELECTION); |
1738 |
} |
} |
1739 |
|
|
1740 |
/** |
/** |
1748 |
*/ |
*/ |
1749 |
protected boolean isMultiSelectEvent(MouseEvent event) |
protected boolean isMultiSelectEvent(MouseEvent event) |
1750 |
{ |
{ |
1751 |
// FIXME: not implemented |
return (tree.getSelectionModel().getSelectionMode() == |
1752 |
return false; |
TreeSelectionModel.CONTIGUOUS_TREE_SELECTION); |
1753 |
} |
} |
1754 |
|
|
1755 |
/** |
/** |
1764 |
*/ |
*/ |
1765 |
protected boolean isToggleEvent(MouseEvent event) |
protected boolean isToggleEvent(MouseEvent event) |
1766 |
{ |
{ |
1767 |
// FIXME: not implemented |
return true; |
|
return false; |
|
1768 |
} |
} |
1769 |
|
|
1770 |
/** |
/** |
1781 |
*/ |
*/ |
1782 |
protected void selectPathForEvent(TreePath path, MouseEvent event) |
protected void selectPathForEvent(TreePath path, MouseEvent event) |
1783 |
{ |
{ |
1784 |
// FIXME: not implemented |
if (isToggleSelectionEvent(event)) |
1785 |
|
{ |
1786 |
|
if (tree.isPathSelected(path)) |
1787 |
|
tree.removeSelectionPath(path); |
1788 |
|
else |
1789 |
|
{ |
1790 |
|
tree.addSelectionPath(path); |
1791 |
|
tree.setAnchorSelectionPath(path); |
1792 |
|
} |
1793 |
|
} |
1794 |
|
else if (isMultiSelectEvent(event)) |
1795 |
|
{ |
1796 |
|
TreePath anchor = tree.getAnchorSelectionPath(); |
1797 |
|
if (anchor != null) |
1798 |
|
{ |
1799 |
|
int aRow = getRowForPath(tree, anchor); |
1800 |
|
tree.addSelectionInterval(aRow, getRowForPath(tree, path)); |
1801 |
|
} |
1802 |
|
else |
1803 |
|
tree.addSelectionPath(path); |
1804 |
|
} |
1805 |
|
else |
1806 |
|
tree.addSelectionPath(path); |
1807 |
} |
} |
1808 |
|
|
1809 |
/** |
/** |
1820 |
return true; |
return true; |
1821 |
|
|
1822 |
Object node = pathForRow.getLastPathComponent(); |
Object node = pathForRow.getLastPathComponent(); |
1823 |
return tree.getModel().isLeaf(node); |
return treeModel.isLeaf(node); |
1824 |
} |
} |
1825 |
|
|
1826 |
/** |
/** |
1856 |
{ |
{ |
1857 |
TreePath[] paths = new TreePath[tree.getRowCount()]; |
TreePath[] paths = new TreePath[tree.getRowCount()]; |
1858 |
|
|
1859 |
Object curr = getNextVisibleNode(tree.getModel().getRoot()); |
Object curr = getNextVisibleNode(treeModel.getRoot()); |
1860 |
int i = 0; |
int i = 0; |
1861 |
while (curr != null && i < paths.length) |
while (curr != null && i < paths.length) |
1862 |
{ |
{ |
1876 |
{ |
{ |
1877 |
Object last = lead.getLastPathComponent(); |
Object last = lead.getLastPathComponent(); |
1878 |
TreePath path = new TreePath(getPathToRoot(last, 0)); |
TreePath path = new TreePath(getPathToRoot(last, 0)); |
1879 |
if (!tree.getModel().isLeaf(last)) |
if (!treeModel.isLeaf(last)) |
1880 |
{ |
toggleExpandState(path); |
|
if (tree.isExpanded(path)) |
|
|
tree.collapsePath(path); |
|
|
else |
|
|
tree.expandPath(path); |
|
|
} |
|
1881 |
} |
} |
1882 |
} |
} |
1883 |
else if (e.getActionCommand().equals("clearSelection")) |
else if (e.getActionCommand().equals("clearSelection")) |
2308 |
|
|
2309 |
if (path != null) |
if (path != null) |
2310 |
{ |
{ |
2311 |
boolean inBounds = false; |
bounds = getPathBounds(tree, path); |
2312 |
boolean cntlClick = false; |
boolean cntlClick = isLocationInExpandControl(path, click.x, click.y); |
2313 |
Rectangle bounds = getPathBounds(tree, path); |
|
2314 |
|
if (tree.isExpanded(path) && expandedIcon != null) |
2315 |
bounds.x -= rightChildIndent - 4; |
{ |
2316 |
bounds.width += rightChildIndent + 4; |
bounds.x -= expandedIcon.getIconWidth() - 4; |
2317 |
|
bounds.width += expandedIcon.getIconWidth() + 4; |
2318 |
if (bounds.contains(click.x, click.y)) |
} |
2319 |
inBounds = true; |
else if (collapsedIcon != null) |
2320 |
else if (hasControlIcons() |
{ |
2321 |
&& (click.x < (bounds.x - rightChildIndent + 5) && |
bounds.x -= collapsedIcon.getIconWidth() - 4; |
2322 |
click.x > (bounds.x - rightChildIndent - 5))) |
bounds.width += collapsedIcon.getIconWidth() + 4; |
2323 |
cntlClick = true; |
} |
2324 |
|
|
2325 |
|
boolean inBounds = bounds.contains(click.x, click.y); |
2326 |
if ((inBounds || cntlClick) && tree.isVisible(path)) |
if ((inBounds || cntlClick) && tree.isVisible(path)) |
2327 |
{ |
{ |
2328 |
selectPath(tree, path); |
selectPath(tree, path); |
2329 |
|
if (inBounds && e.getClickCount() == 2 && !isLeaf(row)) |
2330 |
if ((e.getClickCount() == 2 || cntlClick) && !isLeaf(row)) |
toggleExpandState(path); |
2331 |
{ |
|
2332 |
if (tree.isExpanded(path)) |
if (cntlClick) |
2333 |
tree.collapsePath(path); |
handleExpandControlClick(path, click.x, click.y); |
2334 |
else |
else if (tree.isEditable()) |
|
tree.expandPath(path); |
|
|
} |
|
|
|
|
|
if (!cntlClick && tree.isEditable()) |
|
2335 |
startEditing(path, e); |
startEditing(path, e); |
2336 |
} |
} |
2337 |
} |
} |
2510 |
/** |
/** |
2511 |
* Constructor |
* Constructor |
2512 |
*/ |
*/ |
2513 |
public TreeCancelEditingAction() |
public TreeCancelEditingAction(String name) |
2514 |
{ |
{ |
2515 |
} |
} |
2516 |
|
|
2936 |
*/ |
*/ |
2937 |
public void actionPerformed(ActionEvent e) |
public void actionPerformed(ActionEvent e) |
2938 |
{ |
{ |
|
TreeModel mod = tree.getModel(); |
|
2939 |
Object last = tree.getLeadSelectionPath().getLastPathComponent(); |
Object last = tree.getLeadSelectionPath().getLastPathComponent(); |
2940 |
|
|
2941 |
if (e.getActionCommand().equals("selectParent")) |
if (e.getActionCommand().equals("selectParent")) |
2942 |
{ |
{ |
2943 |
TreePath path = new TreePath(getPathToRoot(last, 0)); |
TreePath path = new TreePath(getPathToRoot(last, 0)); |
2944 |
Object p = getParent(mod.getRoot(), last); |
Object p = getParent(treeModel.getRoot(), last); |
2945 |
|
|
2946 |
if (!mod.isLeaf(last) && tree.isExpanded(path)) |
if (!treeModel.isLeaf(last) && tree.isExpanded(path)) |
2947 |
tree.collapsePath(path); |
tree.collapsePath(path); |
2948 |
else if (p != null) |
else if (p != null) |
2949 |
selectPath(tree, new TreePath(getPathToRoot(p, 0))); |
selectPath(tree, new TreePath(getPathToRoot(p, 0))); |
2952 |
{ |
{ |
2953 |
TreePath path = new TreePath(getPathToRoot(last, 0)); |
TreePath path = new TreePath(getPathToRoot(last, 0)); |
2954 |
|
|
2955 |
if (!mod.isLeaf(last) && tree.isCollapsed(path)) |
if (!treeModel.isLeaf(last) && tree.isCollapsed(path)) |
2956 |
tree.expandPath(path); |
tree.expandPath(path); |
2957 |
else |
else |
2958 |
{ |
{ |
3165 |
{ |
{ |
3166 |
g.setColor(getHashColor()); |
g.setColor(getHashColor()); |
3167 |
heightOfLine = descent + halfHeight; |
heightOfLine = descent + halfHeight; |
3168 |
g.drawLine(indentation + halfWidth, heightOfLine, |
paintHorizontalLine(g, (JComponent) tree, heightOfLine, |
3169 |
indentation + rightChildIndent, heightOfLine); |
indentation + halfWidth, indentation + rightChildIndent); |
3170 |
} |
} |
3171 |
|
|
3172 |
descent = paintRecursive(g, indent, descent, i, depth + 1, |
descent = paintRecursive(g, indent, descent, i, depth + 1, |
3180 |
&& mod.getChildCount(curr) > 0) |
&& mod.getChildCount(curr) > 0) |
3181 |
{ |
{ |
3182 |
g.setColor(getHashColor()); |
g.setColor(getHashColor()); |
3183 |
g.drawLine(indentation + halfWidth, y0, indentation + halfWidth, |
paintVerticalLine(g, (JComponent) tree, indentation + halfWidth, |
3184 |
heightOfLine); |
y0, heightOfLine); |
3185 |
} |
} |
3186 |
|
|
3187 |
return descent; |
return descent; |
3215 |
{ |
{ |
3216 |
int h = descent; |
int h = descent; |
3217 |
int rowHeight = getRowHeight(); |
int rowHeight = getRowHeight(); |
3218 |
Icon ei = UIManager.getLookAndFeelDefaults().getIcon("Tree.expandedIcon"); |
TreePath path = new TreePath(getPathToRoot(node, 0)); |
3219 |
Icon ci = UIManager.getLookAndFeelDefaults().getIcon("Tree.collapsedIcon"); |
Icon icon = getCurrentControlIcon(path); |
3220 |
|
|
3221 |
Rectangle clip = g.getClipBounds(); |
Rectangle clip = g.getClipBounds(); |
3222 |
if (indentation > clip.x + clip.width + rightChildIndent |
if (indentation > clip.x + clip.width + rightChildIndent |
3223 |
|| descent > clip.y + clip.height + getRowHeight()) |
|| descent > clip.y + clip.height + getRowHeight()) |
3233 |
int max = 0; |
int max = 0; |
3234 |
if (!mod.isLeaf(node)) |
if (!mod.isLeaf(node)) |
3235 |
max = mod.getChildCount(node); |
max = mod.getChildCount(node); |
|
if (tree.isExpanded(new TreePath(getPathToRoot(node, 0)))) |
|
|
{ |
|
|
if (!node.equals(mod.getRoot())) |
|
|
ei.paintIcon(tree, g, indentation - rightChildIndent - 3, h); |
|
3236 |
|
|
3237 |
|
if (!node.equals(mod.getRoot())) |
3238 |
|
icon.paintIcon(tree, g, indentation - rightChildIndent - 3, h); |
3239 |
|
|
3240 |
|
if (tree.isExpanded(path)) |
3241 |
|
{ |
3242 |
for (int i = 0; i < max; i++) |
for (int i = 0; i < max; i++) |
3243 |
{ |
{ |
3244 |
int indent = indentation + rightChildIndent; |
int indent = indentation + rightChildIndent; |
3249 |
tree, mod, mod.getChild(node, i)); |
tree, mod, mod.getChild(node, i)); |
3250 |
} |
} |
3251 |
} |
} |
|
else if (!node.equals(mod.getRoot())) |
|
|
ci.paintIcon(tree, g, indentation - rightChildIndent - 3, |
|
|
descent - getRowHeight()); |
|
3252 |
} |
} |
3253 |
|
|
3254 |
return descent; |
return descent; |
3255 |
} |
} |
3256 |
|
|
3257 |
/** |
/** |
3258 |
* Returns true if the LookAndFeel implements the control icons Package |
* Returns control icon. It is null if the LookAndFeel does not |
3259 |
* private for use in inner classes. |
* implements the control icons. |
3260 |
|
* Package private for use in inner classes. |
3261 |
|
* |
3262 |
|
* @return control icon if it exists. |
3263 |
|
*/ |
3264 |
|
Icon getCurrentControlIcon(TreePath path) |
3265 |
|
{ |
3266 |
|
if (tree.isExpanded(path)) |
3267 |
|
return UIManager.getLookAndFeelDefaults().getIcon("Tree.expandedIcon"); |
3268 |
|
return UIManager.getLookAndFeelDefaults().getIcon("Tree.collapsedIcon"); |
3269 |
|
} |
3270 |
|
|
3271 |
|
/** |
3272 |
|
* Returns true if the LookAndFeel implements the control icons. |
3273 |
|
* Package private for use in inner classes. |
3274 |
* |
* |
3275 |
* @return true if control icons are visible |
* @returns true if there are control icons |
3276 |
*/ |
*/ |
3277 |
boolean hasControlIcons() |
boolean hasControlIcons() |
3278 |
{ |
{ |
3279 |
if (UIManager.getLookAndFeelDefaults().getIcon("Tree.expandedIcon") == null |
if (UIManager.getLookAndFeelDefaults().getIcon("Tree.expandedIcon") != null |
3280 |
|| UIManager.getLookAndFeelDefaults().getIcon("Tree.collapsedIcon") == null) |
|| UIManager.getLookAndFeelDefaults().getIcon("Tree.collapsedIcon") |
3281 |
return false; |
!= null) |
3282 |
return true; |
return true; |
3283 |
|
return false; |
3284 |
} |
} |
3285 |
|
|
3286 |
/** |
/** |
3312 |
*/ |
*/ |
3313 |
private Object findNode(Object root, Object node) |
private Object findNode(Object root, Object node) |
3314 |
{ |
{ |
|
TreeModel mod = tree.getModel(); |
|
3315 |
int size = 0; |
int size = 0; |
3316 |
if (!mod.isLeaf(root)) |
if (!treeModel.isLeaf(root)) |
3317 |
size = mod.getChildCount(root); |
size = treeModel.getChildCount(root); |
3318 |
for (int i = 0; i < size; i++) |
for (int i = 0; i < size; i++) |
3319 |
{ |
{ |
3320 |
if (mod.getIndexOfChild(root, node) != -1) |
if (treeModel.getIndexOfChild(root, node) != -1) |
3321 |
return root; |
return root; |
3322 |
|
|
3323 |
Object n = findNode(mod.getChild(root, i), node); |
Object n = findNode(treeModel.getChild(root, i), node); |
3324 |
if (n != null) |
if (n != null) |
3325 |
return n; |
return n; |
3326 |
} |
} |
3404 |
*/ |
*/ |
3405 |
Object getNextNode(Object curr) |
Object getNextNode(Object curr) |
3406 |
{ |
{ |
3407 |
TreeModel mod = tree.getModel(); |
if (!treeModel.isLeaf(curr) && treeModel.getChildCount(curr) > 0) |
3408 |
if (!mod.isLeaf(curr) && mod.getChildCount(curr) > 0) |
return treeModel.getChild(curr, 0); |
|
return mod.getChild(curr, 0); |
|
3409 |
|
|
3410 |
Object node = curr; |
Object node = curr; |
3411 |
Object sibling = null; |
Object sibling = null; |
3413 |
do |
do |
3414 |
{ |
{ |
3415 |
sibling = getNextSibling(node); |
sibling = getNextSibling(node); |
3416 |
node = getParent(mod.getRoot(), node); |
node = getParent(treeModel.getRoot(), node); |
3417 |
} |
} |
3418 |
while (sibling == null && node != null); |
while (sibling == null && node != null); |
3419 |
|
|
3430 |
*/ |
*/ |
3431 |
Object getPreviousNode(Object node) |
Object getPreviousNode(Object node) |
3432 |
{ |
{ |
3433 |
TreeModel mod = tree.getModel(); |
Object parent = getParent(treeModel.getRoot(), node); |
|
Object parent = getParent(mod.getRoot(), node); |
|
3434 |
if (parent == null) |
if (parent == null) |
3435 |
return null; |
return null; |
3436 |
|
|
3440 |
return parent; |
return parent; |
3441 |
|
|
3442 |
int size = 0; |
int size = 0; |
3443 |
if (!mod.isLeaf(sibling)) |
if (!treeModel.isLeaf(sibling)) |
3444 |
size = mod.getChildCount(sibling); |
size = treeModel.getChildCount(sibling); |
3445 |
while (size > 0) |
while (size > 0) |
3446 |
{ |
{ |
3447 |
sibling = mod.getChild(sibling, size - 1); |
sibling = treeModel.getChild(sibling, size - 1); |
3448 |
if (!mod.isLeaf(sibling)) |
if (!treeModel.isLeaf(sibling)) |
3449 |
size = mod.getChildCount(sibling); |
size = treeModel.getChildCount(sibling); |
3450 |
else |
else |
3451 |
size = 0; |
size = 0; |
3452 |
} |
} |
3464 |
*/ |
*/ |
3465 |
Object getNextSibling(Object node) |
Object getNextSibling(Object node) |
3466 |
{ |
{ |
3467 |
TreeModel mod = tree.getModel(); |
Object parent = getParent(treeModel.getRoot(), node); |
|
Object parent = getParent(mod.getRoot(), node); |
|
3468 |
if (parent == null) |
if (parent == null) |
3469 |
return null; |
return null; |
3470 |
|
|
3471 |
int index = mod.getIndexOfChild(parent, node) + 1; |
int index = treeModel.getIndexOfChild(parent, node) + 1; |
3472 |
|
|
3473 |
int size = 0; |
int size = 0; |
3474 |
if (!mod.isLeaf(parent)) |
if (!treeModel.isLeaf(parent)) |
3475 |
size = mod.getChildCount(parent); |
size = treeModel.getChildCount(parent); |
3476 |
if (index == 0 || index >= size) |
if (index == 0 || index >= size) |
3477 |
return null; |
return null; |
3478 |
|
|
3479 |
return mod.getChild(parent, index); |
return treeModel.getChild(parent, index); |
3480 |
} |
} |
3481 |
|
|
3482 |
/** |
/** |
3489 |
*/ |
*/ |
3490 |
Object getPreviousSibling(Object node) |
Object getPreviousSibling(Object node) |
3491 |
{ |
{ |
3492 |
TreeModel mod = tree.getModel(); |
Object parent = getParent(treeModel.getRoot(), node); |
|
Object parent = getParent(mod.getRoot(), node); |
|
3493 |
if (parent == null) |
if (parent == null) |
3494 |
return null; |
return null; |
3495 |
|
|
3496 |
int index = mod.getIndexOfChild(parent, node) - 1; |
int index = treeModel.getIndexOfChild(parent, node) - 1; |
3497 |
|
|
3498 |
int size = 0; |
int size = 0; |
3499 |
if (!mod.isLeaf(parent)) |
if (!treeModel.isLeaf(parent)) |
3500 |
size = mod.getChildCount(parent); |
size = treeModel.getChildCount(parent); |
3501 |
if (index < 0 || index >= size) |
if (index < 0 || index >= size) |
3502 |
return null; |
return null; |
3503 |
|
|
3504 |
return mod.getChild(parent, index); |
return treeModel.getChild(parent, index); |
3505 |
} |
} |
3506 |
|
|
3507 |
/** |
/** |
3549 |
*/ |
*/ |
3550 |
Object[] getPathToRoot(Object node, int depth) |
Object[] getPathToRoot(Object node, int depth) |
3551 |
{ |
{ |
|
TreeModel mod = tree.getModel(); |
|
3552 |
if (node == null) |
if (node == null) |
3553 |
{ |
{ |
3554 |
if (depth == 0) |
if (depth == 0) |
3557 |
return new Object[depth]; |
return new Object[depth]; |
3558 |
} |
} |
3559 |
|
|
3560 |
Object[] path = getPathToRoot(getParent(mod.getRoot(), node), depth + 1); |
Object[] path = getPathToRoot(getParent(treeModel.getRoot(), node), depth + 1); |
3561 |
path[path.length - depth - 1] = node; |
path[path.length - depth - 1] = node; |
3562 |
return path; |
return path; |
3563 |
} |
} |
3576 |
|
|
3577 |
do |
do |
3578 |
{ |
{ |
3579 |
current = getParent(tree.getModel().getRoot(), current); |
current = getParent(treeModel.getRoot(), current); |
3580 |
count++; |
count++; |
3581 |
} |
} |
3582 |
while (current != null); |
while (current != null); |
3645 |
int beginPositionY = y - icon.getIconHeight() / 2; |
int beginPositionY = y - icon.getIconHeight() / 2; |
3646 |
icon.paintIcon(c, g, beginPositionX, beginPositionY); |
icon.paintIcon(c, g, beginPositionX, beginPositionY); |
3647 |
} |
} |
3648 |
|
|
3649 |
|
/** |
3650 |
|
* Draws a dashed horizontal line. |
3651 |
|
* |
3652 |
|
* @param g - the graphics configuration. |
3653 |
|
* @param y - the y location to start drawing at |
3654 |
|
* @param x1 - the x location to start drawing at |
3655 |
|
* @param x2 - the x location to finish drawing at |
3656 |
|
*/ |
3657 |
|
protected void drawDashedHorizontalLine(Graphics g, int y, int x1, int x2) |
3658 |
|
{ |
3659 |
|
for (int i = x1; i < x2; i += 2) |
3660 |
|
g.drawLine(i, y, i + 1, y); |
3661 |
|
} |
3662 |
|
|
3663 |
|
/** |
3664 |
|
* Draws a dashed vertical line. |
3665 |
|
* |
3666 |
|
* @param g - the graphics configuration. |
3667 |
|
* @param x - the x location to start drawing at |
3668 |
|
* @param y1 - the y location to start drawing at |
3669 |
|
* @param y2 - the y location to finish drawing at |
3670 |
|
*/ |
3671 |
|
protected void drawDashedVerticalLine(Graphics g, int x, int y1, int y2) |
3672 |
|
{ |
3673 |
|
for (int i = y1; i < y2; i += 2) |
3674 |
|
g.drawLine(x, i, x, i + 1); |
3675 |
|
} |
3676 |
|
|
3677 |
|
/** |
3678 |
|
* Paints the expand (toggle) part of a row. The receiver should NOT modify |
3679 |
|
* clipBounds, or insets. |
3680 |
|
* |
3681 |
|
* @param g - the graphics configuration |
3682 |
|
* @param clipBounds - |
3683 |
|
* @param insets - |
3684 |
|
* @param bounds - bounds of expand control |
3685 |
|
* @param path - path to draw control for |
3686 |
|
* @param row - row to draw control for |
3687 |
|
* @param isExpanded - is the row expanded |
3688 |
|
* @param hasBeenExpanded - has the row already been expanded |
3689 |
|
* @param isLeaf - is the path a leaf |
3690 |
|
*/ |
3691 |
|
protected void paintExpandControl(Graphics g, Rectangle clipBounds, |
3692 |
|
Insets insets, Rectangle bounds, |
3693 |
|
TreePath path, int row, |
3694 |
|
boolean isExpanded, boolean hasBeenExpanded, |
3695 |
|
boolean isLeaf) |
3696 |
|
{ |
3697 |
|
if (treeModel != null) |
3698 |
|
paintControlIcons(g, 0, 0, 0, 0, tree, treeModel, path.getLastPathComponent()); |
3699 |
|
} |
3700 |
|
|
3701 |
|
/** |
3702 |
|
* Paints the horizontal part of the leg. The receiver should NOT modify |
3703 |
|
* clipBounds, or insets. |
3704 |
|
* NOTE: parentRow can be -1 if the root is not visible. |
3705 |
|
* |
3706 |
|
* @param g - the graphics configuration |
3707 |
|
* @param clipBounds - |
3708 |
|
* @param insets - |
3709 |
|
* @param bounds - bounds of expand control |
3710 |
|
* @param path - path to draw control for |
3711 |
|
* @param row - row to draw control for |
3712 |
|
* @param isExpanded - is the row expanded |
3713 |
|
* @param hasBeenExpanded - has the row already been expanded |
3714 |
|
* @param isLeaf - is the path a leaf |
3715 |
|
*/ |
3716 |
|
protected void paintHorizontalPartOfLeg(Graphics g, Rectangle clipBounds, |
3717 |
|
Insets insets, Rectangle bounds, |
3718 |
|
TreePath path, int row, |
3719 |
|
boolean isExpanded, boolean hasBeenExpanded, |
3720 |
|
boolean isLeaf) |
3721 |
|
{ |
3722 |
|
// FIXME: not implemented |
3723 |
|
} |
3724 |
|
|
3725 |
|
/** |
3726 |
|
* Paints the vertical part of the leg. The receiver should NOT modify |
3727 |
|
* clipBounds, insets. |
3728 |
|
* |
3729 |
|
* @param g - the graphics configuration. |
3730 |
|
* @param clipbounds - |
3731 |
|
* @param insets - |
3732 |
|
* @param path - the path to draw the vertical part for. |
3733 |
|
*/ |
3734 |
|
protected void paintVerticalPartOfLeg(Graphics g, Rectangle clipBounds, |
3735 |
|
Insets insets, TreePath path) |
3736 |
|
{ |
3737 |
|
// FIXME: not implemented |
3738 |
|
} |
3739 |
|
|
3740 |
|
/** |
3741 |
|
* Paints the renderer part of a row. The receiver should NOT modify clipBounds, |
3742 |
|
* or insets. |
3743 |
|
* |
3744 |
|
* @param g - the graphics configuration |
3745 |
|
* @param clipBounds - |
3746 |
|
* @param insets - |
3747 |
|
* @param bounds - bounds of expand control |
3748 |
|
* @param path - path to draw control for |
3749 |
|
* @param row - row to draw control for |
3750 |
|
* @param isExpanded - is the row expanded |
3751 |
|
* @param hasBeenExpanded - has the row already been expanded |
3752 |
|
* @param isLeaf - is the path a leaf |
3753 |
|
*/ |
3754 |
|
protected void paintRow(Graphics g, Rectangle clipBounds, |
3755 |
|
Insets insets, Rectangle bounds, |
3756 |
|
TreePath path, int row, |
3757 |
|
boolean isExpanded, boolean hasBeenExpanded, |
3758 |
|
boolean isLeaf) |
3759 |
|
{ |
3760 |
|
// FIXME: not implemented. |
3761 |
|
} |
3762 |
|
|
3763 |
|
/** |
3764 |
|
* Prepares for the UI to uninstall. |
3765 |
|
*/ |
3766 |
|
protected void prepareForUIUninstall() |
3767 |
|
{ |
3768 |
|
} |
3769 |
|
|
3770 |
|
/** |
3771 |
|
* Returns true if the expand (toggle) control should be drawn for the |
3772 |
|
* specified row. |
3773 |
|
* |
3774 |
|
* @param path - current path to check for. |
3775 |
|
* @param row - current row to check for. |
3776 |
|
* @param isExpanded - true if the path is expanded |
3777 |
|
* @param hasBeenExpanded - true if the path has been expanded already |
3778 |
|
* @param isLeaf - true if the row is a lead |
3779 |
|
*/ |
3780 |
|
protected boolean shouldPaintExpandControl(TreePath path, int row, |
3781 |
|
boolean isExpanded, |
3782 |
|
boolean hasBeenExpanded, |
3783 |
|
boolean isLeaf) |
3784 |
|
{ |
3785 |
|
// FIXME: not implemented. |
3786 |
|
return false; |
3787 |
|
} |
3788 |
} // BasicTreeUI |
} // BasicTreeUI |