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