fix docs add optvalues
[roojs1] / docs / symbols / Roo.grid.CellSelectionModel.json
1 {
2   "name" : "Roo.grid.CellSelectionModel",
3   "augments" : [
4     "Roo.grid.AbstractSelectionModel",
5     "Roo.util.Observable"
6   ],
7   "childClasses" : {  },
8   "tree_children" : [],
9   "tree_parent" : [],
10   "desc" : "This class provides the basic implementation for cell selection in a grid.",
11   "isSingleton" : false,
12   "isStatic" : false,
13   "isBuiltin" : false,
14   "isAbstract" : false,
15   "isBuilderTop" : false,
16   "memberOf" : "CellSelectionModel",
17   "example" : "",
18   "deprecated" : "",
19   "since" : "",
20   "see" : "",
21   "params" : [
22     {
23       "name" : "config",
24       "type" : "Object",
25       "desc" : "The object containing the configuration of this model.",
26       "isOptional" : false
27     }
28   ],
29   "returns" : [],
30   "throws" : "",
31   "requires" : "",
32   "config" : [
33     {
34       "name" : "listeners",
35       "type" : "Object",
36       "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>",
37       "memberOf" : "Roo.util.Observable",
38       "isOptional" : false,
39       "optvalues" : []
40     },
41     {
42       "name" : "enter_is_tab",
43       "type" : "Boolean",
44       "desc" : "Enter behaves the same as tab. (eg. goes to next cell) default: false",
45       "memberOf" : "",
46       "isOptional" : false,
47       "optvalues" : []
48     }
49   ],
50   "methods" : [
51     {
52       "name" : "hasSelection",
53       "type" : "function",
54       "desc" : "Returns true if there is a selection.",
55       "sig" : "()\n{\n\n}",
56       "static" : false,
57       "memberOf" : "",
58       "isStatic" : false,
59       "isConstructor" : false,
60       "isPrivate" : false,
61       "example" : "",
62       "deprecated" : "",
63       "since" : "",
64       "see" : "",
65       "exceptions" : "",
66       "requires" : "",
67       "params" : [],
68       "returns" : [
69         {
70           "name" : "",
71           "type" : "Boolean",
72           "desc" : ""
73         }
74       ]
75     },
76     {
77       "name" : "onEditorKey",
78       "type" : "function",
79       "desc" : "Selects a cell.",
80       "sig" : "(field, e)",
81       "static" : false,
82       "memberOf" : "",
83       "isStatic" : false,
84       "isConstructor" : false,
85       "isPrivate" : false,
86       "example" : "",
87       "deprecated" : "",
88       "since" : "",
89       "see" : "",
90       "exceptions" : "",
91       "requires" : "",
92       "params" : [
93         {
94           "name" : "field",
95           "type" : "Number",
96           "desc" : "(not used) - as it's normally used as a listener",
97           "isOptional" : false
98         },
99         {
100           "name" : "e",
101           "type" : "Number",
102           "desc" : "- event - fake it by using\n\nvar e = Roo.EventObjectImpl.prototype;\ne.keyCode = e.TAB",
103           "isOptional" : false
104         }
105       ],
106       "returns" : []
107     },
108     {
109       "name" : "select",
110       "type" : "function",
111       "desc" : "Selects a cell.",
112       "sig" : "(rowIndex, collIndex)",
113       "static" : false,
114       "memberOf" : "",
115       "isStatic" : false,
116       "isConstructor" : false,
117       "isPrivate" : false,
118       "example" : "",
119       "deprecated" : "",
120       "since" : "",
121       "see" : "",
122       "exceptions" : "",
123       "requires" : "",
124       "params" : [
125         {
126           "name" : "rowIndex",
127           "type" : "Number",
128           "desc" : "",
129           "isOptional" : false
130         },
131         {
132           "name" : "collIndex",
133           "type" : "Number",
134           "desc" : "",
135           "isOptional" : false
136         }
137       ],
138       "returns" : []
139     },
140     {
141       "name" : "getSelectedCell",
142       "type" : "function",
143       "desc" : "Returns the currently selected cell,.",
144       "sig" : "()\n{\n\n}",
145       "static" : false,
146       "memberOf" : "",
147       "isStatic" : false,
148       "isConstructor" : false,
149       "isPrivate" : false,
150       "example" : "",
151       "deprecated" : "",
152       "since" : "",
153       "see" : "",
154       "exceptions" : "",
155       "requires" : "",
156       "params" : [],
157       "returns" : [
158         {
159           "name" : "",
160           "type" : "Array",
161           "desc" : "The selected cell (row, column) or null if none selected."
162         }
163       ]
164     },
165     {
166       "name" : "clearSelections",
167       "type" : "function",
168       "desc" : "Clears all selections.",
169       "sig" : "(true)",
170       "static" : false,
171       "memberOf" : "",
172       "isStatic" : false,
173       "isConstructor" : false,
174       "isPrivate" : false,
175       "example" : "",
176       "deprecated" : "",
177       "since" : "",
178       "see" : "",
179       "exceptions" : "",
180       "requires" : "",
181       "params" : [
182         {
183           "name" : "true",
184           "type" : "Boolean",
185           "desc" : "to prevent the gridview from being notified about the change.",
186           "isOptional" : false
187         }
188       ],
189       "returns" : []
190     },
191     {
192       "name" : "lock",
193       "type" : "function",
194       "desc" : "Locks the selections.",
195       "sig" : "()\n{\n\n}",
196       "static" : false,
197       "memberOf" : "Roo.grid.AbstractSelectionModel",
198       "isStatic" : false,
199       "isConstructor" : false,
200       "isPrivate" : false,
201       "example" : "",
202       "deprecated" : "",
203       "since" : "",
204       "see" : "",
205       "exceptions" : "",
206       "requires" : "",
207       "params" : [],
208       "returns" : []
209     },
210     {
211       "name" : "isLocked",
212       "type" : "function",
213       "desc" : "Returns true if the selections are locked.",
214       "sig" : "()\n{\n\n}",
215       "static" : false,
216       "memberOf" : "Roo.grid.AbstractSelectionModel",
217       "isStatic" : false,
218       "isConstructor" : false,
219       "isPrivate" : false,
220       "example" : "",
221       "deprecated" : "",
222       "since" : "",
223       "see" : "",
224       "exceptions" : "",
225       "requires" : "",
226       "params" : [],
227       "returns" : [
228         {
229           "name" : "",
230           "type" : "Boolean",
231           "desc" : ""
232         }
233       ]
234     },
235     {
236       "name" : "unlock",
237       "type" : "function",
238       "desc" : "Unlocks the selections.",
239       "sig" : "()\n{\n\n}",
240       "static" : false,
241       "memberOf" : "Roo.grid.AbstractSelectionModel",
242       "isStatic" : false,
243       "isConstructor" : false,
244       "isPrivate" : false,
245       "example" : "",
246       "deprecated" : "",
247       "since" : "",
248       "see" : "",
249       "exceptions" : "",
250       "requires" : "",
251       "params" : [],
252       "returns" : []
253     },
254     {
255       "name" : "purgeListeners",
256       "type" : "function",
257       "desc" : "Removes all listeners for this object",
258       "sig" : "()\n{\n\n}",
259       "static" : false,
260       "memberOf" : "Roo.util.Observable",
261       "isStatic" : false,
262       "isConstructor" : false,
263       "isPrivate" : false,
264       "example" : "",
265       "deprecated" : "",
266       "since" : "",
267       "see" : "",
268       "exceptions" : "",
269       "requires" : "",
270       "params" : [],
271       "returns" : []
272     },
273     {
274       "name" : "on",
275       "type" : "function",
276       "desc" : "Appends an event handler to this element (shorthand for addListener)",
277       "sig" : "(eventName, handler, scope, options)",
278       "static" : false,
279       "memberOf" : "Roo.util.Observable",
280       "isStatic" : false,
281       "isConstructor" : false,
282       "isPrivate" : false,
283       "example" : "",
284       "deprecated" : "",
285       "since" : "",
286       "see" : "",
287       "exceptions" : "",
288       "requires" : "",
289       "params" : [
290         {
291           "name" : "eventName",
292           "type" : "String",
293           "desc" : "The type of event to listen for",
294           "isOptional" : false
295         },
296         {
297           "name" : "handler",
298           "type" : "Function",
299           "desc" : "The method the event invokes",
300           "isOptional" : false
301         },
302         {
303           "name" : "scope",
304           "type" : "Object",
305           "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
306           "isOptional" : false
307         },
308         {
309           "name" : "options",
310           "type" : "Object",
311           "desc" : "(optional)",
312           "isOptional" : false
313         }
314       ],
315       "returns" : []
316     },
317     {
318       "name" : "un",
319       "type" : "function",
320       "desc" : "Removes a listener (shorthand for removeListener)",
321       "sig" : "(eventName, handler, scope)",
322       "static" : false,
323       "memberOf" : "Roo.util.Observable",
324       "isStatic" : false,
325       "isConstructor" : false,
326       "isPrivate" : false,
327       "example" : "",
328       "deprecated" : "",
329       "since" : "",
330       "see" : "",
331       "exceptions" : "",
332       "requires" : "",
333       "params" : [
334         {
335           "name" : "eventName",
336           "type" : "String",
337           "desc" : "The type of event to listen for",
338           "isOptional" : false
339         },
340         {
341           "name" : "handler",
342           "type" : "Function",
343           "desc" : "The handler to remove",
344           "isOptional" : false
345         },
346         {
347           "name" : "scope",
348           "type" : "Object",
349           "desc" : "(optional) The scope (this object) for the handler",
350           "isOptional" : false
351         }
352       ],
353       "returns" : []
354     },
355     {
356       "name" : "addEvents",
357       "type" : "function",
358       "desc" : "Used to define events on this Observable",
359       "sig" : "(object)",
360       "static" : false,
361       "memberOf" : "Roo.util.Observable",
362       "isStatic" : false,
363       "isConstructor" : false,
364       "isPrivate" : false,
365       "example" : "",
366       "deprecated" : "",
367       "since" : "",
368       "see" : "",
369       "exceptions" : "",
370       "requires" : "",
371       "params" : [
372         {
373           "name" : "object",
374           "type" : "Object",
375           "desc" : "The object with the events defined",
376           "isOptional" : false
377         }
378       ],
379       "returns" : []
380     },
381     {
382       "name" : "releaseCapture",
383       "type" : "function",
384       "desc" : "Removes <b>all</b> added captures from the Observable.",
385       "sig" : "(o)",
386       "static" : true,
387       "memberOf" : "Roo.util.Observable",
388       "isStatic" : true,
389       "isConstructor" : false,
390       "isPrivate" : false,
391       "example" : "",
392       "deprecated" : "",
393       "since" : "",
394       "see" : "",
395       "exceptions" : "",
396       "requires" : "",
397       "params" : [
398         {
399           "name" : "o",
400           "type" : "Observable",
401           "desc" : "The Observable to release",
402           "isOptional" : false
403         }
404       ],
405       "returns" : []
406     },
407     {
408       "name" : "removeListener",
409       "type" : "function",
410       "desc" : "Removes a listener",
411       "sig" : "(eventName, handler, scope)",
412       "static" : false,
413       "memberOf" : "Roo.util.Observable",
414       "isStatic" : false,
415       "isConstructor" : false,
416       "isPrivate" : false,
417       "example" : "",
418       "deprecated" : "",
419       "since" : "",
420       "see" : "",
421       "exceptions" : "",
422       "requires" : "",
423       "params" : [
424         {
425           "name" : "eventName",
426           "type" : "String",
427           "desc" : "The type of event to listen for",
428           "isOptional" : false
429         },
430         {
431           "name" : "handler",
432           "type" : "Function",
433           "desc" : "The handler to remove",
434           "isOptional" : false
435         },
436         {
437           "name" : "scope",
438           "type" : "Object",
439           "desc" : "(optional) The scope (this object) for the handler",
440           "isOptional" : false
441         }
442       ],
443       "returns" : []
444     },
445     {
446       "name" : "fireEvent",
447       "type" : "function",
448       "desc" : "Fires the specified event with the passed parameters (minus the event name).",
449       "sig" : "(eventName, args)",
450       "static" : false,
451       "memberOf" : "Roo.util.Observable",
452       "isStatic" : false,
453       "isConstructor" : false,
454       "isPrivate" : false,
455       "example" : "",
456       "deprecated" : "",
457       "since" : "",
458       "see" : "",
459       "exceptions" : "",
460       "requires" : "",
461       "params" : [
462         {
463           "name" : "eventName",
464           "type" : "String",
465           "desc" : "",
466           "isOptional" : false
467         },
468         {
469           "name" : "args",
470           "type" : "Object...",
471           "desc" : "Variable number of parameters are passed to handlers",
472           "isOptional" : false
473         }
474       ],
475       "returns" : [
476         {
477           "name" : "",
478           "type" : "Boolean",
479           "desc" : "returns false if any of the handlers return false otherwise it returns true"
480         }
481       ]
482     },
483     {
484       "name" : "hasListener",
485       "type" : "function",
486       "desc" : "Checks to see if this object has any listeners for a specified event",
487       "sig" : "(eventName)",
488       "static" : false,
489       "memberOf" : "Roo.util.Observable",
490       "isStatic" : false,
491       "isConstructor" : false,
492       "isPrivate" : false,
493       "example" : "",
494       "deprecated" : "",
495       "since" : "",
496       "see" : "",
497       "exceptions" : "",
498       "requires" : "",
499       "params" : [
500         {
501           "name" : "eventName",
502           "type" : "String",
503           "desc" : "The name of the event to check for",
504           "isOptional" : false
505         }
506       ],
507       "returns" : [
508         {
509           "name" : "",
510           "type" : "Boolean",
511           "desc" : "True if the event is being listened for, else false"
512         }
513       ]
514     },
515     {
516       "name" : "capture",
517       "type" : "function",
518       "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.",
519       "sig" : "(o, fn, scope)",
520       "static" : true,
521       "memberOf" : "Roo.util.Observable",
522       "isStatic" : true,
523       "isConstructor" : false,
524       "isPrivate" : false,
525       "example" : "",
526       "deprecated" : "",
527       "since" : "",
528       "see" : "",
529       "exceptions" : "",
530       "requires" : "",
531       "params" : [
532         {
533           "name" : "o",
534           "type" : "Observable",
535           "desc" : "The Observable to capture",
536           "isOptional" : false
537         },
538         {
539           "name" : "fn",
540           "type" : "Function",
541           "desc" : "The function to call",
542           "isOptional" : false
543         },
544         {
545           "name" : "scope",
546           "type" : "Object",
547           "desc" : "(optional) The scope (this object) for the fn",
548           "isOptional" : false
549         }
550       ],
551       "returns" : []
552     },
553     {
554       "name" : "addListener",
555       "type" : "function",
556       "desc" : "Appends an event handler to this component",
557       "sig" : "(eventName, handler, scope, options)",
558       "static" : false,
559       "memberOf" : "Roo.util.Observable",
560       "isStatic" : false,
561       "isConstructor" : false,
562       "isPrivate" : false,
563       "example" : "",
564       "deprecated" : "",
565       "since" : "",
566       "see" : "",
567       "exceptions" : "",
568       "requires" : "",
569       "params" : [
570         {
571           "name" : "eventName",
572           "type" : "String",
573           "desc" : "The type of event to listen for",
574           "isOptional" : false
575         },
576         {
577           "name" : "handler",
578           "type" : "Function",
579           "desc" : "The method the event invokes",
580           "isOptional" : false
581         },
582         {
583           "name" : "scope",
584           "type" : "Object",
585           "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
586           "isOptional" : false
587         },
588         {
589           "name" : "options",
590           "type" : "Object",
591           "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>",
592           "isOptional" : false
593         }
594       ],
595       "returns" : []
596     }
597   ],
598   "events" : [
599     {
600       "name" : "beforeeditnext",
601       "type" : "function",
602       "desc" : "Fires before the next editable sell is made active\nYou can use this to skip to another cell or fire the tabend\n   if you set cell to false",
603       "sig" : "function (eventdata)\n{\n\n}",
604       "memberOf" : "",
605       "example" : "",
606       "deprecated" : "",
607       "since" : "",
608       "see" : "",
609       "params" : [
610         {
611           "name" : "eventdata",
612           "type" : "Object",
613           "desc" : "object : { cell : [ row, col ] }",
614           "isOptional" : false
615         }
616       ],
617       "returns" : []
618     },
619     {
620       "name" : "cellselect",
621       "type" : "function",
622       "desc" : "Fires when a cell is selected.",
623       "sig" : "function (_self, rowIndex, colIndex)\n{\n\n}",
624       "memberOf" : "",
625       "example" : "",
626       "deprecated" : "",
627       "since" : "",
628       "see" : "",
629       "params" : [
630         {
631           "name" : "this",
632           "type" : "SelectionModel",
633           "desc" : "",
634           "isOptional" : false
635         },
636         {
637           "name" : "rowIndex",
638           "type" : "Number",
639           "desc" : "The selected row index",
640           "isOptional" : false
641         },
642         {
643           "name" : "colIndex",
644           "type" : "Number",
645           "desc" : "The selected cell index",
646           "isOptional" : false
647         }
648       ],
649       "returns" : []
650     },
651     {
652       "name" : "tabend",
653       "type" : "function",
654       "desc" : "Fires when the tab (or enter) was pressed on the last editable cell\nYou can use this to trigger add new row.",
655       "sig" : "function (_self)\n{\n\n}",
656       "memberOf" : "",
657       "example" : "",
658       "deprecated" : "",
659       "since" : "",
660       "see" : "",
661       "params" : [
662         {
663           "name" : "this",
664           "type" : "SelectionModel",
665           "desc" : "",
666           "isOptional" : false
667         }
668       ],
669       "returns" : []
670     },
671     {
672       "name" : "selectionchange",
673       "type" : "function",
674       "desc" : "Fires when the active selection changes.",
675       "sig" : "function (_self, selection)\n{\n\n}",
676       "memberOf" : "",
677       "example" : "",
678       "deprecated" : "",
679       "since" : "",
680       "see" : "",
681       "params" : [
682         {
683           "name" : "this",
684           "type" : "SelectionModel",
685           "desc" : "",
686           "isOptional" : false
687         },
688         {
689           "name" : "selection",
690           "type" : "Object",
691           "desc" : "null for no selection or an object (o) with two properties\n\t        <ul>\n\t        <li>o.record: the record object for the row the selection is in</li>\n\t        <li>o.cell: An array of [rowIndex, columnIndex]</li>\n\t        </ul>",
692           "isOptional" : false
693         }
694       ],
695       "returns" : []
696     },
697     {
698       "name" : "beforerowselect",
699       "type" : "function",
700       "desc" : "Fires before a cell is selected.",
701       "sig" : "function (_self, rowIndex, colIndex)\n{\n\n}",
702       "memberOf" : "",
703       "example" : "",
704       "deprecated" : "",
705       "since" : "",
706       "see" : "",
707       "params" : [
708         {
709           "name" : "this",
710           "type" : "SelectionModel",
711           "desc" : "",
712           "isOptional" : false
713         },
714         {
715           "name" : "rowIndex",
716           "type" : "Number",
717           "desc" : "The selected row index",
718           "isOptional" : false
719         },
720         {
721           "name" : "colIndex",
722           "type" : "Number",
723           "desc" : "The selected cell index",
724           "isOptional" : false
725         }
726       ],
727       "returns" : []
728     }
729   ]
730 }