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