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