-<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
*/\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
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
* @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
* @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
* @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
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
\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
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
*/\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
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
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
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
*/\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
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
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
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
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