diff options
author | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-03-10 21:46:48 +0000 |
---|---|---|
committer | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-03-10 21:46:48 +0000 |
commit | ce57ab760f69de6db452def7ffbf5b114a2d8694 (patch) | |
tree | ea38c56431c5d4528fb54254c3f8e50f517bede3 /libjava/classpath/javax/swing/JTree.java | |
parent | 50996fe55769882de3f410896032c887f0ff0d04 (diff) | |
download | gcc-ce57ab760f69de6db452def7ffbf5b114a2d8694.tar.gz |
Imported GNU Classpath 0.90
* scripts/makemake.tcl: Set gnu/java/awt/peer/swing to ignore.
* gnu/classpath/jdwp/VMFrame.java (SIZE): New constant.
* java/lang/VMCompiler.java: Use gnu.java.security.hash.MD5.
* java/lang/Math.java: New override file.
* java/lang/Character.java: Merged from Classpath.
(start, end): Now 'int's.
(canonicalName): New field.
(CANONICAL_NAME, NO_SPACES_NAME, CONSTANT_NAME): New constants.
(UnicodeBlock): Added argument.
(of): New overload.
(forName): New method.
Updated unicode blocks.
(sets): Updated.
* sources.am: Regenerated.
* Makefile.in: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111942 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/javax/swing/JTree.java')
-rw-r--r-- | libjava/classpath/javax/swing/JTree.java | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/libjava/classpath/javax/swing/JTree.java b/libjava/classpath/javax/swing/JTree.java index cfcb2291b2c..7876eeb6aaa 100644 --- a/libjava/classpath/javax/swing/JTree.java +++ b/libjava/classpath/javax/swing/JTree.java @@ -1482,6 +1482,9 @@ public class JTree extends JComponent implements Scrollable, Accessible setModel(model); setSelectionModel(new EmptySelectionModel()); selectionModel.setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); + + // The root node appears expanded by default. + nodeStates.put(new TreePath(model.getRoot()), EXPANDED); } /** @@ -2497,8 +2500,9 @@ public class JTree extends JComponent implements Scrollable, Accessible { TreeUI ui = getUI(); - if (ui != null) - return ui.stopEditing(this); + if (isEditing()) + if (ui != null) + return ui.stopEditing(this); return false; } @@ -2506,9 +2510,10 @@ public class JTree extends JComponent implements Scrollable, Accessible public void cancelEditing() { TreeUI ui = getUI(); - - if (ui != null) - ui.cancelEditing(this); + + if (isEditing()) + if (ui != null) + ui.cancelEditing(this); } public void startEditingAtPath(TreePath path) @@ -2738,7 +2743,7 @@ public class JTree extends JComponent implements Scrollable, Accessible * * @return a String representation of this JTree */ - public String paramString() + protected String paramString() { // TODO: this is completely legal, but it would possibly be nice // to return some more content, like the tree structure, some properties |