Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Renaming a Tree Node

Reply
Thread Tools

Renaming a Tree Node

 
 
Jason Cavett
Guest
Posts: n/a
 
      01-29-2007
I am currently renaming a tree node by firing off an event when the
user right clicks on the node and clicks "Rename" on the popup menu.
This works fine. The problem is, I want to be able to check the
string before I allow the name change to take place. This is the
method that is called when I fire off the Rename event.


/**
* Rename a node in the tree.
*/
public void renameTreeNode() {
this.setEditable(true);
TreePath path = this.getSelectionPath();
this.startEditingAtPath(path);
}

Problem is, this must fire off some sort of tree event or something
that I can't figure out. So, there doesn't appear to be a way for me
to get the input that the user typed in until after the fact. Can
anybody provide any insight.

Thanks

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
find path from one tree node to another tree node Peter Mueller Java 6 01-13-2008 02:36 AM
Null parent node on custom tree node after populate on demand John Bankhead ASP .Net Web Controls 0 12-04-2006 06:29 PM
xsl variable $node/text() but $node can non-node-set help! Tjerk Wolterink XML 2 08-24-2006 03:28 AM
How to set the node indent property between the parent node and the leaf node viveknatani@gmail.com ASP .Net 0 02-13-2006 07:11 PM
B tree, B+ tree and B* tree Stub C Programming 3 11-12-2003 01:51 PM



Advertisments