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