sync
[roojs1] / docs / symbols / Roo.tree.DefaultSelectionModel.json
1 {
2   "name" : "Roo.tree.DefaultSelectionModel",
3   "augments" : [
4     "Roo.util.Observable"
5   ],
6   "desc" : "The default single selection for a TreePanel.",
7   "isSingleton" : false,
8   "isStatic" : false,
9   "isBuiltin" : false,
10   "memberOf" : "DefaultSelectionModel",
11   "example" : "",
12   "deprecated" : "",
13   "since" : "",
14   "see" : "",
15   "params" : [
16     {
17       "name" : "cfg",
18       "type" : "Object",
19       "desc" : "Configuration",
20       "isOptional" : false
21     }
22   ],
23   "returns" : [],
24   "throws" : "",
25   "requires" : "",
26   "config" : [
27     {
28       "name" : "listeners",
29       "type" : "Object",
30       "desc" : "list of events and functions to call for this object, \nFor example :\n<pre><code>\n    listeners :  { \n       'click' : function(e) {\n           ..... \n        } ,\n        .... \n    } \n  </code></pre>",
31       "memberOf" : "Roo.util.Observable"
32     }
33   ],
34   "methods" : [
35     {
36       "name" : "getSelectedNode",
37       "type" : "function",
38       "desc" : "Get the selected node",
39       "sig" : "()\n{\n\n}",
40       "static" : false,
41       "memberOf" : "",
42       "isStatic" : false,
43       "isConstructor" : false,
44       "isPrivate" : false,
45       "example" : "",
46       "deprecated" : "",
47       "since" : "",
48       "see" : "",
49       "exceptions" : "",
50       "requires" : "",
51       "params" : [],
52       "returns" : [
53         {
54           "name" : "",
55           "type" : "TreeNode",
56           "desc" : "The selected node"
57         }
58       ]
59     },
60     {
61       "name" : "clearSelections",
62       "type" : "function",
63       "desc" : "Clear all selections",
64       "sig" : "()\n{\n\n}",
65       "static" : false,
66       "memberOf" : "",
67       "isStatic" : false,
68       "isConstructor" : false,
69       "isPrivate" : false,
70       "example" : "",
71       "deprecated" : "",
72       "since" : "",
73       "see" : "",
74       "exceptions" : "",
75       "requires" : "",
76       "params" : [],
77       "returns" : []
78     },
79     {
80       "name" : "isSelected",
81       "type" : "function",
82       "desc" : "Returns true if the node is selected",
83       "sig" : "(node)",
84       "static" : false,
85       "memberOf" : "",
86       "isStatic" : false,
87       "isConstructor" : false,
88       "isPrivate" : false,
89       "example" : "",
90       "deprecated" : "",
91       "since" : "",
92       "see" : "",
93       "exceptions" : "",
94       "requires" : "",
95       "params" : [
96         {
97           "name" : "node",
98           "type" : "TreeNode",
99           "desc" : "The node to check",
100           "isOptional" : false
101         }
102       ],
103       "returns" : [
104         {
105           "name" : "",
106           "type" : "Boolean",
107           "desc" : ""
108         }
109       ]
110     },
111     {
112       "name" : "selectPrevious",
113       "type" : "function",
114       "desc" : "Selects the node above the selected node in the tree, intelligently walking the nodes",
115       "sig" : "()\n{\n\n}",
116       "static" : false,
117       "memberOf" : "",
118       "isStatic" : false,
119       "isConstructor" : false,
120       "isPrivate" : false,
121       "example" : "",
122       "deprecated" : "",
123       "since" : "",
124       "see" : "",
125       "exceptions" : "",
126       "requires" : "",
127       "params" : [],
128       "returns" : [
129         {
130           "name" : "",
131           "type" : "",
132           "desc" : "TreeNode The new selection"
133         }
134       ]
135     },
136     {
137       "name" : "unselect",
138       "type" : "function",
139       "desc" : "Deselect a node.",
140       "sig" : "(node)",
141       "static" : false,
142       "memberOf" : "",
143       "isStatic" : false,
144       "isConstructor" : false,
145       "isPrivate" : false,
146       "example" : "",
147       "deprecated" : "",
148       "since" : "",
149       "see" : "",
150       "exceptions" : "",
151       "requires" : "",
152       "params" : [
153         {
154           "name" : "node",
155           "type" : "TreeNode",
156           "desc" : "The node to unselect",
157           "isOptional" : false
158         }
159       ],
160       "returns" : []
161     },
162     {
163       "name" : "select",
164       "type" : "function",
165       "desc" : "Select a node.",
166       "sig" : "(node)",
167       "static" : false,
168       "memberOf" : "",
169       "isStatic" : false,
170       "isConstructor" : false,
171       "isPrivate" : false,
172       "example" : "",
173       "deprecated" : "",
174       "since" : "",
175       "see" : "",
176       "exceptions" : "",
177       "requires" : "",
178       "params" : [
179         {
180           "name" : "node",
181           "type" : "TreeNode",
182           "desc" : "The node to select",
183           "isOptional" : false
184         }
185       ],
186       "returns" : [
187         {
188           "name" : "",
189           "type" : "TreeNode",
190           "desc" : "The selected node"
191         }
192       ]
193     },
194     {
195       "name" : "selectNext",
196       "type" : "function",
197       "desc" : "Selects the node above the selected node in the tree, intelligently walking the nodes",
198       "sig" : "()\n{\n\n}",
199       "static" : false,
200       "memberOf" : "",
201       "isStatic" : false,
202       "isConstructor" : false,
203       "isPrivate" : false,
204       "example" : "",
205       "deprecated" : "",
206       "since" : "",
207       "see" : "",
208       "exceptions" : "",
209       "requires" : "",
210       "params" : [],
211       "returns" : [
212         {
213           "name" : "",
214           "type" : "",
215           "desc" : "TreeNode The new selection"
216         }
217       ]
218     },
219     {
220       "name" : "purgeListeners",
221       "type" : "function",
222       "desc" : "Removes all listeners for this object",
223       "sig" : "()\n{\n\n}",
224       "static" : false,
225       "memberOf" : "Roo.util.Observable",
226       "isStatic" : false,
227       "isConstructor" : false,
228       "isPrivate" : false,
229       "example" : "",
230       "deprecated" : "",
231       "since" : "",
232       "see" : "",
233       "exceptions" : "",
234       "requires" : "",
235       "params" : [],
236       "returns" : []
237     },
238     {
239       "name" : "on",
240       "type" : "function",
241       "desc" : "Appends an event handler to this element (shorthand for addListener)",
242       "sig" : "(eventName, handler, scope, options)",
243       "static" : false,
244       "memberOf" : "Roo.util.Observable",
245       "isStatic" : false,
246       "isConstructor" : false,
247       "isPrivate" : false,
248       "example" : "",
249       "deprecated" : "",
250       "since" : "",
251       "see" : "",
252       "exceptions" : "",
253       "requires" : "",
254       "params" : [
255         {
256           "name" : "eventName",
257           "type" : "String",
258           "desc" : "The type of event to listen for",
259           "isOptional" : false
260         },
261         {
262           "name" : "handler",
263           "type" : "Function",
264           "desc" : "The method the event invokes",
265           "isOptional" : false
266         },
267         {
268           "name" : "scope",
269           "type" : "Object",
270           "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
271           "isOptional" : false
272         },
273         {
274           "name" : "options",
275           "type" : "Object",
276           "desc" : "(optional)",
277           "isOptional" : false
278         }
279       ],
280       "returns" : []
281     },
282     {
283       "name" : "un",
284       "type" : "function",
285       "desc" : "Removes a listener (shorthand for removeListener)",
286       "sig" : "(eventName, handler, scope)",
287       "static" : false,
288       "memberOf" : "Roo.util.Observable",
289       "isStatic" : false,
290       "isConstructor" : false,
291       "isPrivate" : false,
292       "example" : "",
293       "deprecated" : "",
294       "since" : "",
295       "see" : "",
296       "exceptions" : "",
297       "requires" : "",
298       "params" : [
299         {
300           "name" : "eventName",
301           "type" : "String",
302           "desc" : "The type of event to listen for",
303           "isOptional" : false
304         },
305         {
306           "name" : "handler",
307           "type" : "Function",
308           "desc" : "The handler to remove",
309           "isOptional" : false
310         },
311         {
312           "name" : "scope",
313           "type" : "Object",
314           "desc" : "(optional) The scope (this object) for the handler",
315           "isOptional" : false
316         }
317       ],
318       "returns" : []
319     },
320     {
321       "name" : "addEvents",
322       "type" : "function",
323       "desc" : "Used to define events on this Observable",
324       "sig" : "(object)",
325       "static" : false,
326       "memberOf" : "Roo.util.Observable",
327       "isStatic" : false,
328       "isConstructor" : false,
329       "isPrivate" : false,
330       "example" : "",
331       "deprecated" : "",
332       "since" : "",
333       "see" : "",
334       "exceptions" : "",
335       "requires" : "",
336       "params" : [
337         {
338           "name" : "object",
339           "type" : "Object",
340           "desc" : "The object with the events defined",
341           "isOptional" : false
342         }
343       ],
344       "returns" : []
345     },
346     {
347       "name" : "releaseCapture",
348       "type" : "function",
349       "desc" : "Removes <b>all</b> added captures from the Observable.",
350       "sig" : "(o)",
351       "static" : true,
352       "memberOf" : "Roo.util.Observable",
353       "isStatic" : true,
354       "isConstructor" : false,
355       "isPrivate" : false,
356       "example" : "",
357       "deprecated" : "",
358       "since" : "",
359       "see" : "",
360       "exceptions" : "",
361       "requires" : "",
362       "params" : [
363         {
364           "name" : "o",
365           "type" : "Observable",
366           "desc" : "The Observable to release",
367           "isOptional" : false
368         }
369       ],
370       "returns" : []
371     },
372     {
373       "name" : "removeListener",
374       "type" : "function",
375       "desc" : "Removes a listener",
376       "sig" : "(eventName, handler, scope)",
377       "static" : false,
378       "memberOf" : "Roo.util.Observable",
379       "isStatic" : false,
380       "isConstructor" : false,
381       "isPrivate" : false,
382       "example" : "",
383       "deprecated" : "",
384       "since" : "",
385       "see" : "",
386       "exceptions" : "",
387       "requires" : "",
388       "params" : [
389         {
390           "name" : "eventName",
391           "type" : "String",
392           "desc" : "The type of event to listen for",
393           "isOptional" : false
394         },
395         {
396           "name" : "handler",
397           "type" : "Function",
398           "desc" : "The handler to remove",
399           "isOptional" : false
400         },
401         {
402           "name" : "scope",
403           "type" : "Object",
404           "desc" : "(optional) The scope (this object) for the handler",
405           "isOptional" : false
406         }
407       ],
408       "returns" : []
409     },
410     {
411       "name" : "fireEvent",
412       "type" : "function",
413       "desc" : "Fires the specified event with the passed parameters (minus the event name).",
414       "sig" : "(eventName, args)",
415       "static" : false,
416       "memberOf" : "Roo.util.Observable",
417       "isStatic" : false,
418       "isConstructor" : false,
419       "isPrivate" : false,
420       "example" : "",
421       "deprecated" : "",
422       "since" : "",
423       "see" : "",
424       "exceptions" : "",
425       "requires" : "",
426       "params" : [
427         {
428           "name" : "eventName",
429           "type" : "String",
430           "desc" : "",
431           "isOptional" : false
432         },
433         {
434           "name" : "args",
435           "type" : "Object...",
436           "desc" : "Variable number of parameters are passed to handlers",
437           "isOptional" : false
438         }
439       ],
440       "returns" : [
441         {
442           "name" : "",
443           "type" : "Boolean",
444           "desc" : "returns false if any of the handlers return false otherwise it returns true"
445         }
446       ]
447     },
448     {
449       "name" : "hasListener",
450       "type" : "function",
451       "desc" : "Checks to see if this object has any listeners for a specified event",
452       "sig" : "(eventName)",
453       "static" : false,
454       "memberOf" : "Roo.util.Observable",
455       "isStatic" : false,
456       "isConstructor" : false,
457       "isPrivate" : false,
458       "example" : "",
459       "deprecated" : "",
460       "since" : "",
461       "see" : "",
462       "exceptions" : "",
463       "requires" : "",
464       "params" : [
465         {
466           "name" : "eventName",
467           "type" : "String",
468           "desc" : "The name of the event to check for",
469           "isOptional" : false
470         }
471       ],
472       "returns" : [
473         {
474           "name" : "",
475           "type" : "Boolean",
476           "desc" : "True if the event is being listened for, else false"
477         }
478       ]
479     },
480     {
481       "name" : "capture",
482       "type" : "function",
483       "desc" : "Starts capture on the specified Observable. All events will be passed\nto the supplied function with the event name + standard signature of the event\n<b>before</b> the event is fired. If the supplied function returns false,\nthe event will not fire.",
484       "sig" : "(o, fn, scope)",
485       "static" : true,
486       "memberOf" : "Roo.util.Observable",
487       "isStatic" : true,
488       "isConstructor" : false,
489       "isPrivate" : false,
490       "example" : "",
491       "deprecated" : "",
492       "since" : "",
493       "see" : "",
494       "exceptions" : "",
495       "requires" : "",
496       "params" : [
497         {
498           "name" : "o",
499           "type" : "Observable",
500           "desc" : "The Observable to capture",
501           "isOptional" : false
502         },
503         {
504           "name" : "fn",
505           "type" : "Function",
506           "desc" : "The function to call",
507           "isOptional" : false
508         },
509         {
510           "name" : "scope",
511           "type" : "Object",
512           "desc" : "(optional) The scope (this object) for the fn",
513           "isOptional" : false
514         }
515       ],
516       "returns" : []
517     },
518     {
519       "name" : "addListener",
520       "type" : "function",
521       "desc" : "Appends an event handler to this component",
522       "sig" : "(eventName, handler, scope, options)",
523       "static" : false,
524       "memberOf" : "Roo.util.Observable",
525       "isStatic" : false,
526       "isConstructor" : false,
527       "isPrivate" : false,
528       "example" : "",
529       "deprecated" : "",
530       "since" : "",
531       "see" : "",
532       "exceptions" : "",
533       "requires" : "",
534       "params" : [
535         {
536           "name" : "eventName",
537           "type" : "String",
538           "desc" : "The type of event to listen for",
539           "isOptional" : false
540         },
541         {
542           "name" : "handler",
543           "type" : "Function",
544           "desc" : "The method the event invokes",
545           "isOptional" : false
546         },
547         {
548           "name" : "scope",
549           "type" : "Object",
550           "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
551           "isOptional" : false
552         },
553         {
554           "name" : "options",
555           "type" : "Object",
556           "desc" : "(optional) An object containing handler configuration\nproperties. This may contain any of the following properties:<ul>\n<li>scope {Object} The scope in which to execute the handler function. The handler function's \"this\" context.</li>\n<li>delay {Number} The number of milliseconds to delay the invocation of the handler after te event fires.</li>\n<li>single {Boolean} True to add a handler to handle just the next firing of the event, and then remove itself.</li>\n<li>buffer {Number} Causes the handler to be scheduled to run in an {@link Roo.util.DelayedTask} delayed\nby the specified number of milliseconds. If the event fires again within that time, the original\nhandler is <em>not</em> invoked, but the new handler is scheduled in its place.</li>\n</ul><br>\n<p>\n<b>Combining Options</b><br>\nUsing the options argument, it is possible to combine different types of listeners:<br>\n<br>\nA normalized, delayed, one-time listener that auto stops the event and passes a custom argument (forumId)\n\t\t<pre><code>\n\t\tel.on('click', this.onClick, this, {\n \t\t\tsingle: true,\n    \t\tdelay: 100,\n    \t\tforumId: 4\n\t\t});\n\t\t</code></pre>\n<p>\n<b>Attaching multiple handlers in 1 call</b><br>\nThe method also allows for a single argument to be passed which is a config object containing properties\nwhich specify multiple handlers.\n<pre><code>\n\t\tel.on({\n\t\t\t'click': {\n        \t\tfn: this.onClick,\n        \t\tscope: this,\n        \t\tdelay: 100\n    \t\t}, \n    \t\t'mouseover': {\n        \t\tfn: this.onMouseOver,\n        \t\tscope: this\n    \t\t},\n    \t\t'mouseout': {\n        \t\tfn: this.onMouseOut,\n        \t\tscope: this\n    \t\t}\n\t\t});\n\t\t</code></pre>\n<p>\nOr a shorthand syntax which passes the same scope object to all handlers:\n     \t<pre><code>\n\t\tel.on({\n\t\t\t'click': this.onClick,\n    \t\t'mouseover': this.onMouseOver,\n    \t\t'mouseout': this.onMouseOut,\n    \t\tscope: this\n\t\t});\n\t\t</code></pre>",
557           "isOptional" : false
558         }
559       ],
560       "returns" : []
561     }
562   ],
563   "events" : [
564     {
565       "name" : "selectionchange",
566       "type" : "function",
567       "desc" : "Fires when the selected node changes",
568       "sig" : "function (_self, node)\n{\n\n}",
569       "memberOf" : "",
570       "example" : "",
571       "deprecated" : "",
572       "since" : "",
573       "see" : "",
574       "params" : [
575         {
576           "name" : "this",
577           "type" : "DefaultSelectionModel",
578           "desc" : "",
579           "isOptional" : false
580         },
581         {
582           "name" : "node",
583           "type" : "TreeNode",
584           "desc" : "the new selection",
585           "isOptional" : false
586         }
587       ],
588       "returns" : []
589     },
590     {
591       "name" : "beforeselect",
592       "type" : "function",
593       "desc" : "Fires before the selected node changes, return false to cancel the change",
594       "sig" : "function (_self, node, node)\n{\n\n}",
595       "memberOf" : "",
596       "example" : "",
597       "deprecated" : "",
598       "since" : "",
599       "see" : "",
600       "params" : [
601         {
602           "name" : "this",
603           "type" : "DefaultSelectionModel",
604           "desc" : "",
605           "isOptional" : false
606         },
607         {
608           "name" : "node",
609           "type" : "TreeNode",
610           "desc" : "the new selection",
611           "isOptional" : false
612         },
613         {
614           "name" : "node",
615           "type" : "TreeNode",
616           "desc" : "the old selection",
617           "isOptional" : false
618         }
619       ],
620       "returns" : []
621     }
622   ]
623 }