summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLillian Angel <langel@redhat.com>2005-10-14 22:37:06 +0000
committerLillian Angel <langel@redhat.com>2005-10-14 22:37:06 +0000
commit63686f36e6c7a0c4fe3f14cc309cb632f7124870 (patch)
tree752dff02d6782402d08786020d106fa9ff77195b
parenta47b08825cb5d099f6d9ec46dd8d94de68da3e3f (diff)
downloadclasspath-63686f36e6c7a0c4fe3f14cc309cb632f7124870.tar.gz
2005-10-14 Lillian Angel <langel@redhat.com>
* javax/swing/plaf/basic/BasicTreeUI.java (treeNodesChanged): Added call to revalidate and resize tree. * javax/swing/tree/DefaultTreeModel.java (insertNodeInto): Needed to set parent for new node.
-rw-r--r--ChangeLog7
-rw-r--r--javax/swing/plaf/basic/BasicTreeUI.java2
-rw-r--r--javax/swing/tree/DefaultTreeModel.java1
3 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index aeba12c90..2d6829db8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-10-14 Lillian Angel <langel@redhat.com>
+
+ * javax/swing/plaf/basic/BasicTreeUI.java
+ (treeNodesChanged): Added call to revalidate and resize tree.
+ * javax/swing/tree/DefaultTreeModel.java
+ (insertNodeInto): Needed to set parent for new node.
+
2005-10-14 Robert Schuster <robertschuster@fsfe.org>
* java/net/URLStreamHandler.java:
diff --git a/javax/swing/plaf/basic/BasicTreeUI.java b/javax/swing/plaf/basic/BasicTreeUI.java
index e6b62b336..4d8870188 100644
--- a/javax/swing/plaf/basic/BasicTreeUI.java
+++ b/javax/swing/plaf/basic/BasicTreeUI.java
@@ -2749,6 +2749,8 @@ public class BasicTreeUI
*/
public void treeNodesChanged(TreeModelEvent e)
{
+ validCachedPreferredSize = false;
+ tree.revalidate();
tree.repaint();
}
diff --git a/javax/swing/tree/DefaultTreeModel.java b/javax/swing/tree/DefaultTreeModel.java
index 5b5e03914..5cf809860 100644
--- a/javax/swing/tree/DefaultTreeModel.java
+++ b/javax/swing/tree/DefaultTreeModel.java
@@ -299,6 +299,7 @@ public class DefaultTreeModel
public void insertNodeInto(MutableTreeNode newChild, MutableTreeNode parent,
int index)
{
+ newChild.setParent(parent);
parent.insert(newChild, index);
int[] childIndices = new int[1];
childIndices[0] = index;