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