Fix #5665 - pre-commit hooks for roojs
[roojs1] / docs / symbols / Roo.util.ClickRepeater.json
1 {
2   "name" : "Roo.util.ClickRepeater",
3   "augments" : [
4     "Roo.util.Observable"
5   ],
6   "desc" : "A wrapper class which can be applied to any element. Fires a \"click\" event while the\nmouse is pressed. The interval between firings may be specified in the config but\ndefaults to 10 milliseconds.\n\nOptionally, a CSS class may be applied to the element during the time it is pressed.",
7   "isSingleton" : false,
8   "isStatic" : false,
9   "isBuiltin" : false,
10   "memberOf" : "ClickRepeater",
11   "example" : "",
12   "deprecated" : "",
13   "since" : "",
14   "see" : "",
15   "params" : [
16     {
17       "name" : "el",
18       "type" : "String/HTMLElement/Element",
19       "desc" : "The element to listen on",
20       "isOptional" : false
21     },
22     {
23       "name" : "config",
24       "type" : "Object",
25       "desc" : "",
26       "isOptional" : false
27     }
28   ],
29   "returns" : [
30   ],
31   "config" : [
32     {
33       "name" : "stopDefault",
34       "type" : "Boolean",
35       "desc" : "True to stop the default click event",
36       "memberOf" : "Roo.util.ClickRepeater",
37       "values" : [
38       ]
39     },
40     {
41       "name" : "listeners",
42       "type" : "Object",
43       "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>",
44       "memberOf" : "Roo.util.Observable",
45       "values" : [
46       ]
47     },
48     {
49       "name" : "delay",
50       "type" : "Number",
51       "desc" : "The initial delay before the repeating event begins firing.\nSimilar to an autorepeat key delay.",
52       "memberOf" : "Roo.util.ClickRepeater",
53       "values" : [
54       ]
55     },
56     {
57       "name" : "accelerate",
58       "type" : "Boolean",
59       "desc" : "True if autorepeating should start slowly and accelerate.\n          \"interval\" and \"delay\" are ignored. \"immediate\" is honored.",
60       "memberOf" : "Roo.util.ClickRepeater",
61       "values" : [
62       ]
63     },
64     {
65       "name" : "preventDefault",
66       "type" : "Boolean",
67       "desc" : "True to prevent the default click event",
68       "memberOf" : "Roo.util.ClickRepeater",
69       "values" : [
70       ]
71     },
72     {
73       "name" : "interval",
74       "type" : "Number",
75       "desc" : "The interval between firings of the \"click\" event. Default 10 ms.",
76       "memberOf" : "Roo.util.ClickRepeater",
77       "values" : [
78       ]
79     },
80     {
81       "name" : "el",
82       "type" : "String/HTMLElement/Element",
83       "desc" : "The element to act as a button.",
84       "memberOf" : "Roo.util.ClickRepeater",
85       "values" : [
86       ]
87     },
88     {
89       "name" : "pressClass",
90       "type" : "String",
91       "desc" : "A CSS class name to be applied to the element while pressed.",
92       "memberOf" : "Roo.util.ClickRepeater",
93       "values" : [
94       ]
95     }
96   ],
97   "methods" : [
98     {
99       "name" : "purgeListeners",
100       "desc" : "Removes all listeners for this object",
101       "isStatic" : false,
102       "isConstructor" : false,
103       "isPrivate" : false,
104       "memberOf" : "Roo.util.Observable",
105       "example" : "",
106       "deprecated" : "",
107       "since" : "",
108       "see" : "",
109       "params" : [
110       ],
111       "returns" : [
112       ]
113     },
114     {
115       "name" : "on",
116       "desc" : "Appends an event handler to this element (shorthand for addListener)",
117       "isStatic" : false,
118       "isConstructor" : false,
119       "isPrivate" : false,
120       "memberOf" : "Roo.util.Observable",
121       "example" : "",
122       "deprecated" : "",
123       "since" : "",
124       "see" : "",
125       "params" : [
126         {
127           "name" : "eventName",
128           "type" : "String",
129           "desc" : "The type of event to listen for",
130           "isOptional" : false
131         },
132         {
133           "name" : "handler",
134           "type" : "Function",
135           "desc" : "The method the event invokes",
136           "isOptional" : false
137         },
138         {
139           "name" : "scope",
140           "type" : "Object",
141           "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
142           "isOptional" : false
143         },
144         {
145           "name" : "options",
146           "type" : "Object",
147           "desc" : "(optional)",
148           "isOptional" : false
149         }
150       ],
151       "returns" : [
152       ]
153     },
154     {
155       "name" : "un",
156       "desc" : "Removes a listener (shorthand for removeListener)",
157       "isStatic" : false,
158       "isConstructor" : false,
159       "isPrivate" : false,
160       "memberOf" : "Roo.util.Observable",
161       "example" : "",
162       "deprecated" : "",
163       "since" : "",
164       "see" : "",
165       "params" : [
166         {
167           "name" : "eventName",
168           "type" : "String",
169           "desc" : "The type of event to listen for",
170           "isOptional" : false
171         },
172         {
173           "name" : "handler",
174           "type" : "Function",
175           "desc" : "The handler to remove",
176           "isOptional" : false
177         },
178         {
179           "name" : "scope",
180           "type" : "Object",
181           "desc" : "(optional) The scope (this object) for the handler",
182           "isOptional" : false
183         }
184       ],
185       "returns" : [
186       ]
187     },
188     {
189       "name" : "addEvents",
190       "desc" : "Used to define events on this Observable",
191       "isStatic" : false,
192       "isConstructor" : false,
193       "isPrivate" : false,
194       "memberOf" : "Roo.util.Observable",
195       "example" : "",
196       "deprecated" : "",
197       "since" : "",
198       "see" : "",
199       "params" : [
200         {
201           "name" : "object",
202           "type" : "Object",
203           "desc" : "The object with the events defined",
204           "isOptional" : false
205         }
206       ],
207       "returns" : [
208       ]
209     },
210     {
211       "name" : "releaseCapture",
212       "desc" : "Removes <b>all</b> added captures from the Observable.",
213       "isStatic" : true,
214       "isConstructor" : false,
215       "isPrivate" : false,
216       "memberOf" : "Roo.util.Observable",
217       "example" : "",
218       "deprecated" : "",
219       "since" : "",
220       "see" : "",
221       "params" : [
222         {
223           "name" : "o",
224           "type" : "Observable",
225           "desc" : "The Observable to release",
226           "isOptional" : false
227         }
228       ],
229       "returns" : [
230       ]
231     },
232     {
233       "name" : "removeListener",
234       "desc" : "Removes a listener",
235       "isStatic" : false,
236       "isConstructor" : false,
237       "isPrivate" : false,
238       "memberOf" : "Roo.util.Observable",
239       "example" : "",
240       "deprecated" : "",
241       "since" : "",
242       "see" : "",
243       "params" : [
244         {
245           "name" : "eventName",
246           "type" : "String",
247           "desc" : "The type of event to listen for",
248           "isOptional" : false
249         },
250         {
251           "name" : "handler",
252           "type" : "Function",
253           "desc" : "The handler to remove",
254           "isOptional" : false
255         },
256         {
257           "name" : "scope",
258           "type" : "Object",
259           "desc" : "(optional) The scope (this object) for the handler",
260           "isOptional" : false
261         }
262       ],
263       "returns" : [
264       ]
265     },
266     {
267       "name" : "fireEvent",
268       "desc" : "Fires the specified event with the passed parameters (minus the event name).",
269       "isStatic" : false,
270       "isConstructor" : false,
271       "isPrivate" : false,
272       "memberOf" : "Roo.util.Observable",
273       "example" : "",
274       "deprecated" : "",
275       "since" : "",
276       "see" : "",
277       "params" : [
278         {
279           "name" : "eventName",
280           "type" : "String",
281           "desc" : "",
282           "isOptional" : false
283         },
284         {
285           "name" : "args",
286           "type" : "Object...",
287           "desc" : "Variable number of parameters are passed to handlers",
288           "isOptional" : false
289         }
290       ],
291       "returns" : [
292         {
293           "name" : "",
294           "type" : "Boolean",
295           "desc" : "returns false if any of the handlers return false otherwise it returns true"
296         }
297       ]
298     },
299     {
300       "name" : "hasListener",
301       "desc" : "Checks to see if this object has any listeners for a specified event",
302       "isStatic" : false,
303       "isConstructor" : false,
304       "isPrivate" : false,
305       "memberOf" : "Roo.util.Observable",
306       "example" : "",
307       "deprecated" : "",
308       "since" : "",
309       "see" : "",
310       "params" : [
311         {
312           "name" : "eventName",
313           "type" : "String",
314           "desc" : "The name of the event to check for",
315           "isOptional" : false
316         }
317       ],
318       "returns" : [
319         {
320           "name" : "",
321           "type" : "Boolean",
322           "desc" : "True if the event is being listened for, else false"
323         }
324       ]
325     },
326     {
327       "name" : "capture",
328       "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.",
329       "isStatic" : true,
330       "isConstructor" : false,
331       "isPrivate" : false,
332       "memberOf" : "Roo.util.Observable",
333       "example" : "",
334       "deprecated" : "",
335       "since" : "",
336       "see" : "",
337       "params" : [
338         {
339           "name" : "o",
340           "type" : "Observable",
341           "desc" : "The Observable to capture",
342           "isOptional" : false
343         },
344         {
345           "name" : "fn",
346           "type" : "Function",
347           "desc" : "The function to call",
348           "isOptional" : false
349         },
350         {
351           "name" : "scope",
352           "type" : "Object",
353           "desc" : "(optional) The scope (this object) for the fn",
354           "isOptional" : false
355         }
356       ],
357       "returns" : [
358       ]
359     },
360     {
361       "name" : "addListener",
362       "desc" : "Appends an event handler to this component",
363       "isStatic" : false,
364       "isConstructor" : false,
365       "isPrivate" : false,
366       "memberOf" : "Roo.util.Observable",
367       "example" : "",
368       "deprecated" : "",
369       "since" : "",
370       "see" : "",
371       "params" : [
372         {
373           "name" : "eventName",
374           "type" : "String",
375           "desc" : "The type of event to listen for",
376           "isOptional" : false
377         },
378         {
379           "name" : "handler",
380           "type" : "Function",
381           "desc" : "The method the event invokes",
382           "isOptional" : false
383         },
384         {
385           "name" : "scope",
386           "type" : "Object",
387           "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
388           "isOptional" : false
389         },
390         {
391           "name" : "options",
392           "type" : "Object",
393           "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>",
394           "isOptional" : false
395         }
396       ],
397       "returns" : [
398       ]
399     }
400   ],
401   "events" : [
402     {
403       "name" : "mousedown",
404       "desc" : "Fires when the mouse button is depressed.",
405       "memberOf" : "Roo.util.ClickRepeater",
406       "example" : "",
407       "deprecated" : "",
408       "since" : "",
409       "see" : "",
410       "params" : [
411         {
412           "name" : "this",
413           "type" : "Roo.util.ClickRepeater",
414           "desc" : "",
415           "isOptional" : false
416         }
417       ],
418       "returns" : [
419       ]
420     },
421     {
422       "name" : "click",
423       "desc" : "Fires on a specified interval during the time the element is pressed.",
424       "memberOf" : "Roo.util.ClickRepeater",
425       "example" : "",
426       "deprecated" : "",
427       "since" : "",
428       "see" : "",
429       "params" : [
430         {
431           "name" : "this",
432           "type" : "Roo.util.ClickRepeater",
433           "desc" : "",
434           "isOptional" : false
435         }
436       ],
437       "returns" : [
438       ]
439     },
440     {
441       "name" : "mouseup",
442       "desc" : "Fires when the mouse key is released.",
443       "memberOf" : "Roo.util.ClickRepeater",
444       "example" : "",
445       "deprecated" : "",
446       "since" : "",
447       "see" : "",
448       "params" : [
449         {
450           "name" : "this",
451           "type" : "Roo.util.ClickRepeater",
452           "desc" : "",
453           "isOptional" : false
454         }
455       ],
456       "returns" : [
457       ]
458     }
459   ]
460 }