J
Jason Cavett
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
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