Instead of overriding (Ext.tree.TreeNodeUI.override), I recommend a different approach as it may impact the behavior of all TreeNodeUI's within the application. My suggestion is to override the createNode method in the TreeLoader specific to the current tree:
new Ext.tree.TreePanel({
...
loader:new Ext.tree.TreeLoader({
...
// customizing the CreateNode function
createNode:function (attr) {
attr.uiProvider = Ext.extend(Ext.tree.TreeNodeUI, {
// private
onDblClick:function (e) {
e.preventDefault();
if (this.disabled) {
return;
}
if (this.fireEvent("beforedblclick", this.node, e) !== false) {
// if (this.checkbox) {
// this.toggleCheck();
// }
// if (!this.animating && this.node.isExpandable()) {
// this.node.toggle();
// }
// YOUR CUSTOM CODE HERE
this.fireEvent("dblclick", this.node, e);
}
}
});
return Ext.tree.TreeLoader.prototype.createNode.call(this, attr);
}});