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