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