Upgrade to ExtJS 3.0.3 - Released 10/11/2009
[extjs.git] / docs / source / TreeNode.html
index ff39011..997f910 100644 (file)
@@ -1,11 +1,17 @@
-<html>\r
-<head>\r
-  <title>The source code</title>\r
-    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
-    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
-</head>\r
-<body  onload="prettyPrint();">\r
-    <pre class="prettyprint lang-js"><div id="cls-Ext.tree.TreeNode"></div>/**\r
+<html>
+<head>
+  <title>The source code</title>
+    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
+    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
+</head>
+<body  onload="prettyPrint();">
+    <pre class="prettyprint lang-js">/*!
+ * Ext JS Library 3.0.3
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+<div id="cls-Ext.tree.TreeNode"></div>/**\r
  * @class Ext.tree.TreeNode\r
  * @extends Ext.data.Node\r
  * @cfg {String} text The text for this node\r
@@ -36,7 +42,7 @@
  */\r
 Ext.tree.TreeNode = function(attributes){\r
     attributes = attributes || {};\r
-    if(typeof attributes == "string"){\r
+    if(typeof attributes == 'string'){\r
         attributes = {text: attributes};\r
     }\r
     this.childrenRendered = false;\r
@@ -48,7 +54,7 @@ Ext.tree.TreeNode = function(attributes){
     this.allowChildren = attributes.allowChildren !== false && attributes.allowDrop !== false;\r
 \r
     /**\r
-     * Read-only. The text for this node. To change it use setText().\r
+     * Read-only. The text for this node. To change it use <code>{@link #setText}</code>.\r
      * @type String\r
      */\r
     this.text = attributes.text;\r
@@ -71,7 +77,7 @@ Ext.tree.TreeNode = function(attributes){
         * @param {String} text The new text\r
         * @param {String} oldText The old text\r
         */\r
-        "textchange",\r
+        'textchange',\r
         /**\r
         * @event beforeexpand\r
         * Fires before this node is expanded, return false to cancel.\r
@@ -79,7 +85,7 @@ Ext.tree.TreeNode = function(attributes){
         * @param {Boolean} deep\r
         * @param {Boolean} anim\r
         */\r
-        "beforeexpand",\r
+        'beforeexpand',\r
         /**\r
         * @event beforecollapse\r
         * Fires before this node is collapsed, return false to cancel.\r
@@ -87,67 +93,74 @@ Ext.tree.TreeNode = function(attributes){
         * @param {Boolean} deep\r
         * @param {Boolean} anim\r
         */\r
-        "beforecollapse",\r
+        'beforecollapse',\r
         /**\r
         * @event expand\r
         * Fires when this node is expanded\r
         * @param {Node} this This node\r
         */\r
-        "expand",\r
+        'expand',\r
         /**\r
         * @event disabledchange\r
         * Fires when the disabled status of this node changes\r
         * @param {Node} this This node\r
         * @param {Boolean} disabled\r
         */\r
-        "disabledchange",\r
+        'disabledchange',\r
         /**\r
         * @event collapse\r
         * Fires when this node is collapsed\r
         * @param {Node} this This node\r
         */\r
-        "collapse",\r
+        'collapse',\r
         /**\r
         * @event beforeclick\r
         * Fires before click processing. Return false to cancel the default action.\r
         * @param {Node} this This node\r
         * @param {Ext.EventObject} e The event object\r
         */\r
-        "beforeclick",\r
+        'beforeclick',\r
         /**\r
         * @event click\r
         * Fires when this node is clicked\r
         * @param {Node} this This node\r
         * @param {Ext.EventObject} e The event object\r
         */\r
-        "click",\r
+        'click',\r
         /**\r
         * @event checkchange\r
         * Fires when a node with a checkbox's checked property changes\r
         * @param {Node} this This node\r
         * @param {Boolean} checked\r
         */\r
-        "checkchange",\r
+        'checkchange',\r
+        /**\r
+        * @event beforedblclick\r
+        * Fires before double click processing. Return false to cancel the default action.\r
+        * @param {Node} this This node\r
+        * @param {Ext.EventObject} e The event object\r
+        */\r
+        'beforedblclick',\r
         /**\r
         * @event dblclick\r
         * Fires when this node is double clicked\r
         * @param {Node} this This node\r
         * @param {Ext.EventObject} e The event object\r
         */\r
-        "dblclick",\r
+        'dblclick',\r
         /**\r
         * @event contextmenu\r
         * Fires when this node is right clicked\r
         * @param {Node} this This node\r
         * @param {Ext.EventObject} e The event object\r
         */\r
-        "contextmenu",\r
+        'contextmenu',\r
         /**\r
         * @event beforechildrenrendered\r
         * Fires right before the child nodes for this node are rendered\r
         * @param {Node} this This node\r
         */\r
-        "beforechildrenrendered"\r
+        'beforechildrenrendered'\r
     );\r
 \r
     var uiClass = this.attributes.uiProvider || this.defaultUI || Ext.tree.TreeNodeUI;\r
@@ -159,7 +172,7 @@ Ext.tree.TreeNode = function(attributes){
     this.ui = new uiClass(this);\r
 };\r
 Ext.extend(Ext.tree.TreeNode, Ext.data.Node, {\r
-    preventHScroll: true,\r
+    preventHScroll : true,\r
     /**\r
      * Returns true if this node is expanded\r
      * @return {Boolean}\r
@@ -242,7 +255,7 @@ Ext.extend(Ext.tree.TreeNode, Ext.data.Node, {
 \r
     // private override\r
     insertBefore : function(node, refNode){\r
-        if(!node.render){ \r
+        if(!node.render){\r
             node = this.getLoader().createNode(node);\r
         }\r
         var newNode = Ext.tree.TreeNode.superclass.insertBefore.call(this, node, refNode);\r
@@ -264,7 +277,7 @@ Ext.extend(Ext.tree.TreeNode, Ext.data.Node, {
         if(this.rendered){ // event without subscribing\r
             this.ui.onTextChange(this, text, oldText);\r
         }\r
-        this.fireEvent("textchange", this, text, oldText);\r
+        this.fireEvent('textchange', this, text, oldText);\r
     },\r
 \r
     /**\r
@@ -300,7 +313,7 @@ Ext.extend(Ext.tree.TreeNode, Ext.data.Node, {
      */\r
     expand : function(deep, anim, callback, scope){\r
         if(!this.expanded){\r
-            if(this.fireEvent("beforeexpand", this, deep, anim) === false){\r
+            if(this.fireEvent('beforeexpand', this, deep, anim) === false){\r
                 return;\r
             }\r
             if(!this.childrenRendered){\r
@@ -309,7 +322,7 @@ Ext.extend(Ext.tree.TreeNode, Ext.data.Node, {
             this.expanded = true;\r
             if(!this.isHiddenRoot() && (this.getOwnerTree().animate && anim !== false) || anim){\r
                 this.ui.animExpand(function(){\r
-                    this.fireEvent("expand", this);\r
+                    this.fireEvent('expand', this);\r
                     this.runCallback(callback, scope || this, [this]);\r
                     if(deep === true){\r
                         this.expandChildNodes(true);\r
@@ -318,7 +331,7 @@ Ext.extend(Ext.tree.TreeNode, Ext.data.Node, {
                 return;\r
             }else{\r
                 this.ui.expand();\r
-                this.fireEvent("expand", this);\r
+                this.fireEvent('expand', this);\r
                 this.runCallback(callback, scope || this, [this]);\r
             }\r
         }else{\r
@@ -328,8 +341,8 @@ Ext.extend(Ext.tree.TreeNode, Ext.data.Node, {
             this.expandChildNodes(true);\r
         }\r
     },\r
-    \r
-    runCallback: function(cb, scope, args){\r
+\r
+    runCallback : function(cb, scope, args){\r
         if(Ext.isFunction(cb)){\r
             cb.apply(scope, args);\r
         }\r
@@ -350,13 +363,13 @@ Ext.extend(Ext.tree.TreeNode, Ext.data.Node, {
      */\r
     collapse : function(deep, anim, callback, scope){\r
         if(this.expanded && !this.isHiddenRoot()){\r
-            if(this.fireEvent("beforecollapse", this, deep, anim) === false){\r
+            if(this.fireEvent('beforecollapse', this, deep, anim) === false){\r
                 return;\r
             }\r
             this.expanded = false;\r
             if((this.getOwnerTree().animate && anim !== false) || anim){\r
                 this.ui.animCollapse(function(){\r
-                    this.fireEvent("collapse", this);\r
+                    this.fireEvent('collapse', this);\r
                     this.runCallback(callback, scope || this, [this]);\r
                     if(deep === true){\r
                         this.collapseChildNodes(true);\r
@@ -365,7 +378,7 @@ Ext.extend(Ext.tree.TreeNode, Ext.data.Node, {
                 return;\r
             }else{\r
                 this.ui.collapse();\r
-                this.fireEvent("collapse", this);\r
+                this.fireEvent('collapse', this);\r
                 this.runCallback(callback, scope || this, [this]);\r
             }\r
         }else if(!this.expanded){\r
@@ -451,7 +464,7 @@ Ext.extend(Ext.tree.TreeNode, Ext.data.Node, {
         if(this.rendered && this.ui.onDisableChange){ // event without subscribing\r
             this.ui.onDisableChange(this, true);\r
         }\r
-        this.fireEvent("disabledchange", this, true);\r
+        this.fireEvent('disabledchange', this, true);\r
     },\r
 \r
     /**\r
@@ -462,13 +475,13 @@ Ext.extend(Ext.tree.TreeNode, Ext.data.Node, {
         if(this.rendered && this.ui.onDisableChange){ // event without subscribing\r
             this.ui.onDisableChange(this, false);\r
         }\r
-        this.fireEvent("disabledchange", this, false);\r
+        this.fireEvent('disabledchange', this, false);\r
     },\r
 \r
     // private\r
     renderChildren : function(suppressEvent){\r
         if(suppressEvent !== false){\r
-            this.fireEvent("beforechildrenrendered", this);\r
+            this.fireEvent('beforechildrenrendered', this);\r
         }\r
         var cs = this.childNodes;\r
         for(var i = 0, len = cs.length; i < len; i++){\r
@@ -537,13 +550,13 @@ Ext.extend(Ext.tree.TreeNode, Ext.data.Node, {
             this.ui.destroy();\r
         }\r
     },\r
-    \r
+\r
     // private\r
-    onIdChange: function(id){\r
+    onIdChange : function(id){\r
         this.ui.onIdChange(id);\r
     }\r
 });\r
 \r
-Ext.tree.TreePanel.nodeTypes.node = Ext.tree.TreeNode;</pre>    \r
-</body>\r
+Ext.tree.TreePanel.nodeTypes.node = Ext.tree.TreeNode;</pre>
+</body>
 </html>
\ No newline at end of file