diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | javax/swing/plaf/basic/BasicTreeUI.java | 8 |
2 files changed, 9 insertions, 3 deletions
@@ -1,5 +1,9 @@ 2005-07-14 Lillian Angel <langel@redhat.com> * javax/swing/plaf/basic/BasicTreeUI.java + (paintControlIcons): Changed so root does not have control icon. + +2005-07-14 Lillian Angel <langel@redhat.com> + * javax/swing/plaf/basic/BasicTreeUI.java (installUI): Expanded root initially (paint): call function to paint controls (paintRecursive): added to indentation when painting to increase space diff --git a/javax/swing/plaf/basic/BasicTreeUI.java b/javax/swing/plaf/basic/BasicTreeUI.java index 779f285f7..278fa5785 100644 --- a/javax/swing/plaf/basic/BasicTreeUI.java +++ b/javax/swing/plaf/basic/BasicTreeUI.java @@ -2737,7 +2737,7 @@ public class BasicTreeUI { descent += rowHeight; } - else + else { if (depth > 0 || tree.isRootVisible()) { @@ -2748,14 +2748,16 @@ public class BasicTreeUI if (tree.isExpanded(new TreePath(((DefaultMutableTreeNode) node) .getPath()))) { - ei.paintIcon(tree, g, indentation - rightChildIndent - 3, h); + if (!node.equals(mod.getRoot())) + ei.paintIcon(tree, g, indentation - rightChildIndent - 3, h); + for (int i = 0; i < max; ++i) { descent = paintControlIcons(g, indentation + rightChildIndent, descent, i, depth + 1, tree, mod, mod.getChild(node, i)); } } - else + else if (!node.equals(mod.getRoot())) ci.paintIcon(tree, g, indentation - rightChildIndent - 3, descent - getRowHeight()); } |