summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLillian Angel <langel@redhat.com>2005-07-14 19:26:47 +0000
committerLillian Angel <langel@redhat.com>2005-07-14 19:26:47 +0000
commitda95b185bbbfb0430e72b0a736e23d446569ced7 (patch)
tree0b4f0d523fd7b64f61d9e702f05802dbbca428c9
parenta3ccb4ca63c226b2c02a7fcec9ceac2e3ac2a9d7 (diff)
downloadclasspath-da95b185bbbfb0430e72b0a736e23d446569ced7.tar.gz
2005-07-14 Lillian Angel <langel@redhat.com>
* javax/swing/plaf/basic/BasicTreeUI.java (paintControlIcons): Changed so root does not have control icon.
-rw-r--r--ChangeLog4
-rw-r--r--javax/swing/plaf/basic/BasicTreeUI.java8
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index d263000f6..99fcc1328 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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());
}