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