// create constructor for new class
Ext.tree.DDDTreePanel = function(config){
    Ext.tree.DDDTreePanel.superclass.constructor.call(this, config);
};

// extend the base class
Ext.extend(Ext.tree.DDDTreePanel, Ext.tree.TreePanel, {
    allowDrag : function(allow){
        if (allow) {
            if(this.enableDD || this.enableDrag){ 
                this.dragZone = new Ext.tree.TreeDragZone(this, this.dragConfig || {ddGroup: this.ddGroup || "TreeDD", scroll: this.ddScroll});
            }
        } else {
            this.dragZone.unreg(); // Unregister the dragZone so Dragging is disabled.
        }        
    },
    
    allowDrop : function(allow){
        if (allow) {
            if(this.enableDD || this.enableDrop){ 
           
                 this.dropZone = new Ext.tree.TreeDropZone(this, this.dropConfig || {
                       ddGroup: this.ddGroup || "TreeDD", appendOnly: this.ddAppendOnly === true
                 });
            }
          } else {
            this.dropZone.unreg(); // Unregister the dropZone so Dropping is disabled.
        } 
    }
});

