~crf-team/crf-irp/crf-irp

« back to all changes in this revision

Viewing changes to WebContent/js/extjs-2/docs/output/TreeNode.jss.html

  • Committer: Thomas
  • Date: 2010-03-10 23:55:46 UTC
  • Revision ID: thomas@daisybox-port-20100310235546-23635dk6x5asb1ca
Upgrade ExtJs 3.1.1
Upgrade Spring 3.0.1 + dependencies
Change Jawr JS post processor : YUI
Upgrade to last build of dwr 3 trunk 69 revision 3019(after build 116), upgrade jawr-dwr plugin 1.4 unofficiale from jose noheda, Jawr 3.2.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<html><head><title>TreeNode.js</title><link rel="stylesheet" type="text/css" href="../resources/style.css" media="screen"/></head><body><h1>TreeNode.js</h1><pre class="highlighted"><code><i>/**
2
 
 * @class Ext.tree.TreeNode
3
 
 * @extends Ext.data.Node
4
 
 * @cfg {String} text The text <b>for</b> this node
5
 
 * @cfg {Boolean} expanded true to start the node expanded
6
 
 * @cfg {Boolean} allowDrag False to make <b>this</b> node undraggable <b>if</b> {@link #draggable} = true (defaults to true)
7
 
 * @cfg {Boolean} allowDrop False <b>if</b> this node cannot have child nodes dropped on it (defaults to true)
8
 
 * @cfg {Boolean} disabled true to start the node disabled
9
 
 * @cfg {String} icon The path to an icon <b>for</b> the node. The preferred way to <b>do</b> this
10
 
 * is to use the cls or iconCls attributes and add the icon via a CSS background image.
11
 
 * @cfg {String} cls A css class to be added to the node
12
 
 * @cfg {String} iconCls A css class to be added to the nodes icon element <b>for</b> applying css background images
13
 
 * @cfg {String} href URL of the link used <b>for</b> the node (defaults to #)
14
 
 * @cfg {String} hrefTarget target frame <b>for</b> the link
15
 
 * @cfg {Boolean} hidden True to render hidden. (Defaults to false).
16
 
 * @cfg {String} qtip An Ext QuickTip <b>for</b> the node
17
 
 * @cfg {Boolean} expandable If set to true, the node will always show a plus/minus icon, even when empty
18
 
 * @cfg {String} qtipCfg An Ext QuickTip config <b>for</b> the node (used instead of qtip)
19
 
 * @cfg {Boolean} singleClickExpand True <b>for</b> single click expand on <b>this</b> node
20
 
 * @cfg {Function} uiProvider A UI &lt;b&gt;class&lt;/b&gt; to use <b>for</b> this node (defaults to Ext.tree.TreeNodeUI)
21
 
 * @cfg {Boolean} checked True to render a checked checkbox <b>for</b> this node, false to render an unchecked checkbox
22
 
 * (defaults to undefined <b>with</b> no checkbox rendered)
23
 
 * @cfg {Boolean} draggable True to make <b>this</b> node draggable (defaults to false)
24
 
 * @cfg {Boolean} isTarget False to not allow <b>this</b> node to act as a drop target (defaults to true)
25
 
 * @cfg {Boolean} allowChildren False to not allow <b>this</b> node to have child nodes (defaults to true)
26
 
 * @cfg {Boolean} editable False to not allow <b>this</b> node to be edited by an (@link Ext.tree.TreeEditor} (defaults to true)
27
 
 * @constructor
28
 
 * @param {Object/String} attributes The attributes/config <b>for</b> the node or just a string <b>with</b> the text <b>for</b> the node
29
 
 */</i>
30
 
Ext.tree.TreeNode = <b>function</b>(attributes){
31
 
    attributes = attributes || {};
32
 
    <b>if</b>(typeof attributes == &quot;string&quot;){
33
 
        attributes = {text: attributes};
34
 
    }
35
 
    <b>this</b>.childrenRendered = false;
36
 
    <b>this</b>.rendered = false;
37
 
    Ext.tree.TreeNode.superclass.constructor.call(<b>this</b>, attributes);
38
 
    <b>this</b>.expanded = attributes.expanded === true;
39
 
    <b>this</b>.isTarget = attributes.isTarget !== false;
40
 
    <b>this</b>.draggable = attributes.draggable !== false &amp;&amp; attributes.allowDrag !== false;
41
 
    <b>this</b>.allowChildren = attributes.allowChildren !== false &amp;&amp; attributes.allowDrop !== false;
42
 
 
43
 
    <i>/**
44
 
     * Read-only. The text <b>for</b> this node. To change it use setText().
45
 
     * @type String
46
 
     */</i>
47
 
    <b>this</b>.text = attributes.text;
48
 
    <i>/**
49
 
     * True <b>if</b> this node is disabled.
50
 
     * @type Boolean
51
 
     */</i>
52
 
    <b>this</b>.disabled = attributes.disabled === true;
53
 
    <i>/**
54
 
     * True <b>if</b> this node is hidden.
55
 
     * @type Boolean
56
 
     */</i>
57
 
    <b>this</b>.hidden = attributes.hidden === true;
58
 
 
59
 
    <b>this</b>.addEvents(
60
 
        <i>/**
61
 
        * @event textchange
62
 
        * Fires when the text <b>for</b> this node is changed
63
 
        * @param {Node} <b>this</b> This node
64
 
        * @param {String} text The <b>new</b> text
65
 
        * @param {String} oldText The old text
66
 
        */</i>
67
 
        &quot;textchange&quot;,
68
 
        <i>/**
69
 
        * @event beforeexpand
70
 
        * Fires before <b>this</b> node is expanded, <b>return</b> false to cancel.
71
 
        * @param {Node} <b>this</b> This node
72
 
        * @param {Boolean} deep
73
 
        * @param {Boolean} anim
74
 
        */</i>
75
 
        &quot;beforeexpand&quot;,
76
 
        <i>/**
77
 
        * @event beforecollapse
78
 
        * Fires before <b>this</b> node is collapsed, <b>return</b> false to cancel.
79
 
        * @param {Node} <b>this</b> This node
80
 
        * @param {Boolean} deep
81
 
        * @param {Boolean} anim
82
 
        */</i>
83
 
        &quot;beforecollapse&quot;,
84
 
        <i>/**
85
 
        * @event expand
86
 
        * Fires when <b>this</b> node is expanded
87
 
        * @param {Node} <b>this</b> This node
88
 
        */</i>
89
 
        &quot;expand&quot;,
90
 
        <i>/**
91
 
        * @event disabledchange
92
 
        * Fires when the disabled status of <b>this</b> node changes
93
 
        * @param {Node} <b>this</b> This node
94
 
        * @param {Boolean} disabled
95
 
        */</i>
96
 
        &quot;disabledchange&quot;,
97
 
        <i>/**
98
 
        * @event collapse
99
 
        * Fires when <b>this</b> node is collapsed
100
 
        * @param {Node} <b>this</b> This node
101
 
        */</i>
102
 
        &quot;collapse&quot;,
103
 
        <i>/**
104
 
        * @event beforeclick
105
 
        * Fires before click processing. Return false to cancel the <b>default</b> action.
106
 
        * @param {Node} <b>this</b> This node
107
 
        * @param {Ext.EventObject} e The event object
108
 
        */</i>
109
 
        &quot;beforeclick&quot;,
110
 
        <i>/**
111
 
        * @event click
112
 
        * Fires when <b>this</b> node is clicked
113
 
        * @param {Node} <b>this</b> This node
114
 
        * @param {Ext.EventObject} e The event object
115
 
        */</i>
116
 
        &quot;click&quot;,
117
 
        <i>/**
118
 
        * @event checkchange
119
 
        * Fires when a node <b>with</b> a checkbox's checked property changes
120
 
        * @param {Node} <b>this</b> This node
121
 
        * @param {Boolean} checked
122
 
        */</i>
123
 
        &quot;checkchange&quot;,
124
 
        <i>/**
125
 
        * @event dblclick
126
 
        * Fires when <b>this</b> node is double clicked
127
 
        * @param {Node} <b>this</b> This node
128
 
        * @param {Ext.EventObject} e The event object
129
 
        */</i>
130
 
        &quot;dblclick&quot;,
131
 
        <i>/**
132
 
        * @event contextmenu
133
 
        * Fires when <b>this</b> node is right clicked
134
 
        * @param {Node} <b>this</b> This node
135
 
        * @param {Ext.EventObject} e The event object
136
 
        */</i>
137
 
        &quot;contextmenu&quot;,
138
 
        <i>/**
139
 
        * @event beforechildrenrendered
140
 
        * Fires right before the child nodes <b>for</b> this node are rendered
141
 
        * @param {Node} <b>this</b> This node
142
 
        */</i>
143
 
        &quot;beforechildrenrendered&quot;
144
 
    );
145
 
 
146
 
    <b>var</b> uiClass = <b>this</b>.attributes.uiProvider || <b>this</b>.defaultUI || Ext.tree.TreeNodeUI;
147
 
 
148
 
    <i>/**
149
 
     * Read-only. The UI <b>for</b> this node
150
 
     * @type TreeNodeUI
151
 
     */</i>
152
 
    <b>this</b>.ui = <b>new</b> uiClass(<b>this</b>);
153
 
};
154
 
Ext.extend(Ext.tree.TreeNode, Ext.data.Node, {
155
 
    preventHScroll: true,
156
 
    <i>/**
157
 
     * Returns true <b>if</b> this node is expanded
158
 
     * @<b>return</b> {Boolean}
159
 
     */</i>
160
 
    isExpanded : <b>function</b>(){
161
 
        <b>return</b> this.expanded;
162
 
    },
163
 
 
164
 
<i>/**
165
 
 * Returns the UI object <b>for</b> this node.
166
 
 * @<b>return</b> {TreeNodeUI} The object which is providing the user interface <b>for</b> this tree
167
 
 * node. Unless otherwise specified <b>in</b> the {@link #uiProvider}, <b>this</b> will be an instance
168
 
 * of {@link Ext.tree.TreeNodeUI}
169
 
 */</i>
170
 
    getUI : <b>function</b>(){
171
 
        <b>return</b> this.ui;
172
 
    },
173
 
 
174
 
    getLoader : <b>function</b>(){
175
 
        <b>var</b> owner;
176
 
        <b>return</b> this.loader || ((owner = <b>this</b>.getOwnerTree()) &amp;&amp; owner.loader ? owner.loader : <b>new</b> Ext.tree.TreeLoader());
177
 
    },
178
 
 
179
 
    <i>// private override</i>
180
 
    setFirstChild : <b>function</b>(node){
181
 
        <b>var</b> of = <b>this</b>.firstChild;
182
 
        Ext.tree.TreeNode.superclass.setFirstChild.call(<b>this</b>, node);
183
 
        <b>if</b>(this.childrenRendered &amp;&amp; of &amp;&amp; node != of){
184
 
            of.renderIndent(true, true);
185
 
        }
186
 
        <b>if</b>(this.rendered){
187
 
            <b>this</b>.renderIndent(true, true);
188
 
        }
189
 
    },
190
 
 
191
 
    <i>// private override</i>
192
 
    setLastChild : <b>function</b>(node){
193
 
        <b>var</b> ol = <b>this</b>.lastChild;
194
 
        Ext.tree.TreeNode.superclass.setLastChild.call(<b>this</b>, node);
195
 
        <b>if</b>(this.childrenRendered &amp;&amp; ol &amp;&amp; node != ol){
196
 
            ol.renderIndent(true, true);
197
 
        }
198
 
        <b>if</b>(this.rendered){
199
 
            <b>this</b>.renderIndent(true, true);
200
 
        }
201
 
    },
202
 
 
203
 
    <i>// these methods are overridden to provide lazy rendering support</i>
204
 
    <i>// private override</i>
205
 
    appendChild : <b>function</b>(n){
206
 
        <b>if</b>(!n.render &amp;&amp; !Ext.isArray(n)){
207
 
            n = <b>this</b>.getLoader().createNode(n);
208
 
        }
209
 
        <b>var</b> node = Ext.tree.TreeNode.superclass.appendChild.call(<b>this</b>, n);
210
 
        <b>if</b>(node &amp;&amp; <b>this</b>.childrenRendered){
211
 
            node.render();
212
 
        }
213
 
        <b>this</b>.ui.updateExpandIcon();
214
 
        <b>return</b> node;
215
 
    },
216
 
 
217
 
    <i>// private override</i>
218
 
    removeChild : <b>function</b>(node){
219
 
        <b>this</b>.ownerTree.getSelectionModel().unselect(node);
220
 
        Ext.tree.TreeNode.superclass.removeChild.apply(<b>this</b>, arguments);
221
 
        <i>// <b>if</b> it's been rendered remove dom node</i>
222
 
        <b>if</b>(this.childrenRendered){
223
 
            node.ui.remove();
224
 
        }
225
 
        <b>if</b>(this.childNodes.length &lt; 1){
226
 
            <b>this</b>.collapse(false, false);
227
 
        }<b>else</b>{
228
 
            <b>this</b>.ui.updateExpandIcon();
229
 
        }
230
 
        <b>if</b>(!<b>this</b>.firstChild &amp;&amp; !<b>this</b>.isHiddenRoot()) {
231
 
            <b>this</b>.childrenRendered = false;
232
 
        }
233
 
        <b>return</b> node;
234
 
    },
235
 
 
236
 
    <i>// private override</i>
237
 
    insertBefore : <b>function</b>(node, refNode){
238
 
        <b>if</b>(!node.render){ 
239
 
            node = <b>this</b>.getLoader().createNode(node);
240
 
        }
241
 
        <b>var</b> newNode = Ext.tree.TreeNode.superclass.insertBefore.apply(<b>this</b>, arguments);
242
 
        <b>if</b>(newNode &amp;&amp; refNode &amp;&amp; <b>this</b>.childrenRendered){
243
 
            node.render();
244
 
        }
245
 
        <b>this</b>.ui.updateExpandIcon();
246
 
        <b>return</b> newNode;
247
 
    },
248
 
 
249
 
    <i>/**
250
 
     * Sets the text <b>for</b> this node
251
 
     * @param {String} text
252
 
     */</i>
253
 
    setText : <b>function</b>(text){
254
 
        <b>var</b> oldText = <b>this</b>.text;
255
 
        <b>this</b>.text = text;
256
 
        <b>this</b>.attributes.text = text;
257
 
        <b>if</b>(this.rendered){ <i>// event without subscribing</i>
258
 
            <b>this</b>.ui.onTextChange(<b>this</b>, text, oldText);
259
 
        }
260
 
        <b>this</b>.fireEvent(&quot;textchange&quot;, <b>this</b>, text, oldText);
261
 
    },
262
 
 
263
 
    <i>/**
264
 
     * Triggers selection of <b>this</b> node
265
 
     */</i>
266
 
    select : <b>function</b>(){
267
 
        <b>this</b>.getOwnerTree().getSelectionModel().select(<b>this</b>);
268
 
    },
269
 
 
270
 
    <i>/**
271
 
     * Triggers deselection of <b>this</b> node
272
 
     */</i>
273
 
    unselect : <b>function</b>(){
274
 
        <b>this</b>.getOwnerTree().getSelectionModel().unselect(<b>this</b>);
275
 
    },
276
 
 
277
 
    <i>/**
278
 
     * Returns true <b>if</b> this node is selected
279
 
     * @<b>return</b> {Boolean}
280
 
     */</i>
281
 
    isSelected : <b>function</b>(){
282
 
        <b>return</b> this.getOwnerTree().getSelectionModel().isSelected(<b>this</b>);
283
 
    },
284
 
 
285
 
    <i>/**
286
 
     * Expand <b>this</b> node.
287
 
     * @param {Boolean} deep (optional) True to expand all children as well
288
 
     * @param {Boolean} anim (optional) false to cancel the <b>default</b> animation
289
 
     * @param {Function} callback (optional) A callback to be called when
290
 
     * expanding <b>this</b> node completes (does not wait <b>for</b> deep expand to complete).
291
 
     * Called <b>with</b> 1 parameter, <b>this</b> node.
292
 
     */</i>
293
 
    expand : <b>function</b>(deep, anim, callback){
294
 
        <b>if</b>(!<b>this</b>.expanded){
295
 
            <b>if</b>(this.fireEvent(&quot;beforeexpand&quot;, <b>this</b>, deep, anim) === false){
296
 
                <b>return</b>;
297
 
            }
298
 
            <b>if</b>(!<b>this</b>.childrenRendered){
299
 
                <b>this</b>.renderChildren();
300
 
            }
301
 
            <b>this</b>.expanded = true;
302
 
            <b>if</b>(!<b>this</b>.isHiddenRoot() &amp;&amp; (<b>this</b>.getOwnerTree().animate &amp;&amp; anim !== false) || anim){
303
 
                <b>this</b>.ui.animExpand(<b>function</b>(){
304
 
                    <b>this</b>.fireEvent(&quot;expand&quot;, <b>this</b>);
305
 
                    <b>if</b>(typeof callback == &quot;<b>function</b>&quot;){
306
 
                        callback(<b>this</b>);
307
 
                    }
308
 
                    <b>if</b>(deep === true){
309
 
                        <b>this</b>.expandChildNodes(true);
310
 
                    }
311
 
                }.createDelegate(<b>this</b>));
312
 
                <b>return</b>;
313
 
            }<b>else</b>{
314
 
                <b>this</b>.ui.expand();
315
 
                <b>this</b>.fireEvent(&quot;expand&quot;, <b>this</b>);
316
 
                <b>if</b>(typeof callback == &quot;<b>function</b>&quot;){
317
 
                    callback(<b>this</b>);
318
 
                }
319
 
            }
320
 
        }<b>else</b>{
321
 
           <b>if</b>(typeof callback == &quot;<b>function</b>&quot;){
322
 
               callback(<b>this</b>);
323
 
           }
324
 
        }
325
 
        <b>if</b>(deep === true){
326
 
            <b>this</b>.expandChildNodes(true);
327
 
        }
328
 
    },
329
 
 
330
 
    isHiddenRoot : <b>function</b>(){
331
 
        <b>return</b> this.isRoot &amp;&amp; !<b>this</b>.getOwnerTree().rootVisible;
332
 
    },
333
 
 
334
 
    <i>/**
335
 
     * Collapse <b>this</b> node.
336
 
     * @param {Boolean} deep (optional) True to collapse all children as well
337
 
     * @param {Boolean} anim (optional) false to cancel the <b>default</b> animation
338
 
     */</i>
339
 
    collapse : <b>function</b>(deep, anim){
340
 
        <b>if</b>(this.expanded &amp;&amp; !<b>this</b>.isHiddenRoot()){
341
 
            <b>if</b>(this.fireEvent(&quot;beforecollapse&quot;, <b>this</b>, deep, anim) === false){
342
 
                <b>return</b>;
343
 
            }
344
 
            <b>this</b>.expanded = false;
345
 
            <b>if</b>((<b>this</b>.getOwnerTree().animate &amp;&amp; anim !== false) || anim){
346
 
                <b>this</b>.ui.animCollapse(<b>function</b>(){
347
 
                    <b>this</b>.fireEvent(&quot;collapse&quot;, <b>this</b>);
348
 
                    <b>if</b>(deep === true){
349
 
                        <b>this</b>.collapseChildNodes(true);
350
 
                    }
351
 
                }.createDelegate(<b>this</b>));
352
 
                <b>return</b>;
353
 
            }<b>else</b>{
354
 
                <b>this</b>.ui.collapse();
355
 
                <b>this</b>.fireEvent(&quot;collapse&quot;, <b>this</b>);
356
 
            }
357
 
        }
358
 
        <b>if</b>(deep === true){
359
 
            <b>var</b> cs = <b>this</b>.childNodes;
360
 
            <b>for</b>(var i = 0, len = cs.length; i &lt; len; i++) {
361
 
                cs[i].collapse(true, false);
362
 
            }
363
 
        }
364
 
    },
365
 
 
366
 
    <i>// private</i>
367
 
    delayedExpand : <b>function</b>(delay){
368
 
        <b>if</b>(!<b>this</b>.expandProcId){
369
 
            <b>this</b>.expandProcId = <b>this</b>.expand.defer(delay, <b>this</b>);
370
 
        }
371
 
    },
372
 
 
373
 
    <i>// private</i>
374
 
    cancelExpand : <b>function</b>(){
375
 
        <b>if</b>(this.expandProcId){
376
 
            clearTimeout(<b>this</b>.expandProcId);
377
 
        }
378
 
        <b>this</b>.expandProcId = false;
379
 
    },
380
 
 
381
 
    <i>/**
382
 
     * Toggles expanded/collapsed state of the node
383
 
     */</i>
384
 
    toggle : <b>function</b>(){
385
 
        <b>if</b>(this.expanded){
386
 
            <b>this</b>.collapse();
387
 
        }<b>else</b>{
388
 
            <b>this</b>.expand();
389
 
        }
390
 
    },
391
 
 
392
 
    <i>/**
393
 
     * Ensures all parent nodes are expanded, and <b>if</b> necessary, scrolls
394
 
     * the node into view.
395
 
     * @param {Function} callback (optional) A <b>function</b> to call when the node has been made visible.
396
 
     */</i>
397
 
    ensureVisible : <b>function</b>(callback){
398
 
        <b>var</b> tree = <b>this</b>.getOwnerTree();
399
 
        tree.expandPath(<b>this</b>.parentNode ? <b>this</b>.parentNode.getPath() : <b>this</b>.getPath(), false, <b>function</b>(){
400
 
            <b>var</b> node = tree.getNodeById(<b>this</b>.id);  <i>// Somehow <b>if</b> we don't <b>do</b> this, we lose changes that happened to node <b>in</b> the meantime</i>
401
 
            tree.getTreeEl().scrollChildIntoView(node.ui.anchor);
402
 
            Ext.callback(callback);
403
 
        }.createDelegate(<b>this</b>));
404
 
    },
405
 
 
406
 
    <i>/**
407
 
     * Expand all child nodes
408
 
     * @param {Boolean} deep (optional) true <b>if</b> the child nodes should also expand their child nodes
409
 
     */</i>
410
 
    expandChildNodes : <b>function</b>(deep){
411
 
        <b>var</b> cs = <b>this</b>.childNodes;
412
 
        <b>for</b>(var i = 0, len = cs.length; i &lt; len; i++) {
413
 
                cs[i].expand(deep);
414
 
        }
415
 
    },
416
 
 
417
 
    <i>/**
418
 
     * Collapse all child nodes
419
 
     * @param {Boolean} deep (optional) true <b>if</b> the child nodes should also collapse their child nodes
420
 
     */</i>
421
 
    collapseChildNodes : <b>function</b>(deep){
422
 
        <b>var</b> cs = <b>this</b>.childNodes;
423
 
        <b>for</b>(var i = 0, len = cs.length; i &lt; len; i++) {
424
 
                cs[i].collapse(deep);
425
 
        }
426
 
    },
427
 
 
428
 
    <i>/**
429
 
     * Disables <b>this</b> node
430
 
     */</i>
431
 
    disable : <b>function</b>(){
432
 
        <b>this</b>.disabled = true;
433
 
        <b>this</b>.unselect();
434
 
        <b>if</b>(this.rendered &amp;&amp; <b>this</b>.ui.onDisableChange){ <i>// event without subscribing</i>
435
 
            <b>this</b>.ui.onDisableChange(<b>this</b>, true);
436
 
        }
437
 
        <b>this</b>.fireEvent(&quot;disabledchange&quot;, <b>this</b>, true);
438
 
    },
439
 
 
440
 
    <i>/**
441
 
     * Enables <b>this</b> node
442
 
     */</i>
443
 
    enable : <b>function</b>(){
444
 
        <b>this</b>.disabled = false;
445
 
        <b>if</b>(this.rendered &amp;&amp; <b>this</b>.ui.onDisableChange){ <i>// event without subscribing</i>
446
 
            <b>this</b>.ui.onDisableChange(<b>this</b>, false);
447
 
        }
448
 
        <b>this</b>.fireEvent(&quot;disabledchange&quot;, <b>this</b>, false);
449
 
    },
450
 
 
451
 
    <i>// private</i>
452
 
    renderChildren : <b>function</b>(suppressEvent){
453
 
        <b>if</b>(suppressEvent !== false){
454
 
            <b>this</b>.fireEvent(&quot;beforechildrenrendered&quot;, <b>this</b>);
455
 
        }
456
 
        <b>var</b> cs = <b>this</b>.childNodes;
457
 
        <b>for</b>(var i = 0, len = cs.length; i &lt; len; i++){
458
 
            cs[i].render(true);
459
 
        }
460
 
        <b>this</b>.childrenRendered = true;
461
 
    },
462
 
 
463
 
    <i>// private</i>
464
 
    sort : <b>function</b>(fn, scope){
465
 
        Ext.tree.TreeNode.superclass.sort.apply(<b>this</b>, arguments);
466
 
        <b>if</b>(this.childrenRendered){
467
 
            <b>var</b> cs = <b>this</b>.childNodes;
468
 
            <b>for</b>(var i = 0, len = cs.length; i &lt; len; i++){
469
 
                cs[i].render(true);
470
 
            }
471
 
        }
472
 
    },
473
 
 
474
 
    <i>// private</i>
475
 
    render : <b>function</b>(bulkRender){
476
 
        <b>this</b>.ui.render(bulkRender);
477
 
        <b>if</b>(!<b>this</b>.rendered){
478
 
            <i>// make sure it is registered</i>
479
 
            <b>this</b>.getOwnerTree().registerNode(<b>this</b>);
480
 
            <b>this</b>.rendered = true;
481
 
            <b>if</b>(this.expanded){
482
 
                <b>this</b>.expanded = false;
483
 
                <b>this</b>.expand(false, false);
484
 
            }
485
 
        }
486
 
    },
487
 
 
488
 
    <i>// private</i>
489
 
    renderIndent : <b>function</b>(deep, refresh){
490
 
        <b>if</b>(refresh){
491
 
            <b>this</b>.ui.childIndent = null;
492
 
        }
493
 
        <b>this</b>.ui.renderIndent();
494
 
        <b>if</b>(deep === true &amp;&amp; <b>this</b>.childrenRendered){
495
 
            <b>var</b> cs = <b>this</b>.childNodes;
496
 
            <b>for</b>(var i = 0, len = cs.length; i &lt; len; i++){
497
 
                cs[i].renderIndent(true, refresh);
498
 
            }
499
 
        }
500
 
    },
501
 
 
502
 
    beginUpdate : <b>function</b>(){
503
 
        <b>this</b>.childrenRendered = false;
504
 
    },
505
 
 
506
 
    endUpdate : <b>function</b>(){
507
 
        <b>if</b>(this.expanded &amp;&amp; <b>this</b>.rendered){
508
 
            <b>this</b>.renderChildren();
509
 
        }
510
 
    },
511
 
 
512
 
    destroy : <b>function</b>(){
513
 
        <b>if</b>(this.childNodes){
514
 
                <b>for</b>(var i = 0,l = <b>this</b>.childNodes.length; i &lt; l; i++){
515
 
                    <b>this</b>.childNodes[i].destroy();
516
 
                }
517
 
            <b>this</b>.childNodes = null;
518
 
        }
519
 
        <b>if</b>(this.ui.destroy){
520
 
            <b>this</b>.ui.destroy();
521
 
        }
522
 
    }
523
 
});
524
 
 
525
 
Ext.tree.TreePanel.nodeTypes.node = Ext.tree.TreeNode;</code></pre><hr><div style="font-size:10px;text-align:center;color:gray;">Ext - Copyright &copy; 2006-2007 Ext JS, LLC<br />All rights reserved.</div>
526
 
    </body></html>
 
 
b'\\ No newline at end of file'