Partial Fix #5654 - roojspacker - get it working as a doc tool...
[roojs1] / docs2 / symbols / Roo.Component.json
1 {
2   "name" : "Roo.Component",
3   "augments" : [
4     "Roo.util.Observable"
5   ],
6   "desc" : "Base class for all major Roo components.  All subclasses of Component can automatically participate in the standard\nRoo component lifecycle of creation, rendering and destruction.  They also have automatic support for basic hide/show\nand enable/disable behavior.  Component allows any subclass to be lazy-rendered into any {@link Roo.Container} and\nto be automatically registered with the {@link Roo.ComponentMgr} so that it can be referenced at any time via {@link Roo.getCmp}.\nAll visual components (widgets) that require rendering into a layout should subclass Component.",
7   "isSingleton" : false,
8   "isStatic" : true,
9   "isBuiltin" : false,
10   "config" : [
11     {
12       "name" : "listeners",
13       "type" : "Object",
14       "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>",
15       "memberOf" : "Roo.util.Observable",
16       "values" : [
17       ]
18     },
19     {
20       "name" : "hideMode",
21       "type" : "String",
22       "desc" : "How this component should hidden. Supported values are\n\"visibility\" (css visibility), \"offsets\" (negative offset position) and\n\"display\" (css display) - defaults to \"display\".",
23       "memberOf" : "Roo.Component",
24       "values" : [
25         "(display",
26         "visibility)"
27       ]
28     },
29     {
30       "name" : "allowDomMove",
31       "type" : "Boolean",
32       "desc" : "Whether the component can move the Dom node when rendering (defaults to true).",
33       "memberOf" : "Roo.Component",
34       "values" : [
35       ]
36     },
37     {
38       "name" : "actionMode",
39       "type" : "String",
40       "desc" : "which property holds the element that used for  hide() / show() / disable() / enable()\ndefault is 'el'",
41       "memberOf" : "Roo.Component",
42       "values" : [
43       ]
44     },
45     {
46       "name" : "disableClass",
47       "type" : "String",
48       "desc" : "CSS class added to the component when it is disabled (defaults to \"x-item-disabled\").",
49       "memberOf" : "Roo.Component",
50       "values" : [
51       ]
52     }
53   ],
54   "methods" : [
55     {
56       "name" : "getId",
57       "desc" : "Returns the id of this component.",
58       "isStatic" : false,
59       "isConstructor" : false,
60       "isPrivate" : false,
61       "memberOf" : "Roo.Component",
62       "example" : "",
63       "deprecated" : "",
64       "since" : "",
65       "see" : "",
66       "params" : [
67       ],
68       "returns" : [
69         {
70           "name" : "",
71           "type" : "String",
72           "desc" : ""
73         }
74       ]
75     },
76     {
77       "name" : "render",
78       "desc" : "If this is a lazy rendering component, render it to its container element.",
79       "isStatic" : false,
80       "isConstructor" : false,
81       "isPrivate" : false,
82       "memberOf" : "Roo.Component",
83       "example" : "",
84       "deprecated" : "",
85       "since" : "",
86       "see" : "",
87       "params" : [
88         {
89           "name" : "container",
90           "type" : "String/HTMLElement/Element",
91           "desc" : "(optional) The element this component should be rendered into. If it is being applied to existing markup, this should be left off.",
92           "isOptional" : false
93         }
94       ],
95       "returns" : [
96       ]
97     },
98     {
99       "name" : "destroy",
100       "desc" : "Destroys this component by purging any event listeners, removing the component's element from the DOM,\nremoving the component from its {@link Roo.Container} (if applicable) and unregistering it from {@link Roo.ComponentMgr}.",
101       "isStatic" : false,
102       "isConstructor" : false,
103       "isPrivate" : false,
104       "memberOf" : "Roo.Component",
105       "example" : "",
106       "deprecated" : "",
107       "since" : "",
108       "see" : "",
109       "params" : [
110       ],
111       "returns" : [
112       ]
113     },
114     {
115       "name" : "isVisible",
116       "desc" : "Returns true if this component is visible.",
117       "isStatic" : false,
118       "isConstructor" : false,
119       "isPrivate" : false,
120       "memberOf" : "Roo.Component",
121       "example" : "",
122       "deprecated" : "",
123       "since" : "",
124       "see" : "",
125       "params" : [
126       ],
127       "returns" : [
128       ]
129     },
130     {
131       "name" : "setDisabled",
132       "desc" : "Convenience function for setting disabled/enabled by boolean.",
133       "isStatic" : false,
134       "isConstructor" : false,
135       "isPrivate" : false,
136       "memberOf" : "Roo.Component",
137       "example" : "",
138       "deprecated" : "",
139       "since" : "",
140       "see" : "",
141       "params" : [
142         {
143           "name" : "disabled",
144           "type" : "Boolean",
145           "desc" : "",
146           "isOptional" : false
147         }
148       ],
149       "returns" : [
150       ]
151     },
152     {
153       "name" : "hide",
154       "desc" : "Hide this component.",
155       "isStatic" : false,
156       "isConstructor" : false,
157       "isPrivate" : false,
158       "memberOf" : "Roo.Component",
159       "example" : "",
160       "deprecated" : "",
161       "since" : "",
162       "see" : "",
163       "params" : [
164       ],
165       "returns" : [
166         {
167           "name" : "",
168           "type" : "Roo.Component",
169           "desc" : "this"
170         }
171       ]
172     },
173     {
174       "name" : "focus",
175       "desc" : "Try to focus this component.",
176       "isStatic" : false,
177       "isConstructor" : false,
178       "isPrivate" : false,
179       "memberOf" : "Roo.Component",
180       "example" : "",
181       "deprecated" : "",
182       "since" : "",
183       "see" : "",
184       "params" : [
185         {
186           "name" : "selectText",
187           "type" : "Boolean",
188           "desc" : "True to also select the text in this component (if applicable)",
189           "isOptional" : false
190         }
191       ],
192       "returns" : [
193         {
194           "name" : "",
195           "type" : "Roo.Component",
196           "desc" : "this"
197         }
198       ]
199     },
200     {
201       "name" : "show",
202       "desc" : "Show this component.",
203       "isStatic" : false,
204       "isConstructor" : false,
205       "isPrivate" : false,
206       "memberOf" : "Roo.Component",
207       "example" : "",
208       "deprecated" : "",
209       "since" : "",
210       "see" : "",
211       "params" : [
212       ],
213       "returns" : [
214         {
215           "name" : "",
216           "type" : "Roo.Component",
217           "desc" : "this"
218         }
219       ]
220     },
221     {
222       "name" : "enable",
223       "desc" : "Enable this component.",
224       "isStatic" : false,
225       "isConstructor" : false,
226       "isPrivate" : false,
227       "memberOf" : "Roo.Component",
228       "example" : "",
229       "deprecated" : "",
230       "since" : "",
231       "see" : "",
232       "params" : [
233       ],
234       "returns" : [
235         {
236           "name" : "",
237           "type" : "Roo.Component",
238           "desc" : "this"
239         }
240       ]
241     },
242     {
243       "name" : "setVisible",
244       "desc" : "Convenience function to hide or show this component by boolean.",
245       "isStatic" : false,
246       "isConstructor" : false,
247       "isPrivate" : false,
248       "memberOf" : "Roo.Component",
249       "example" : "",
250       "deprecated" : "",
251       "since" : "",
252       "see" : "",
253       "params" : [
254         {
255           "name" : "visible",
256           "type" : "Boolean",
257           "desc" : "True to show, false to hide",
258           "isOptional" : false
259         }
260       ],
261       "returns" : [
262         {
263           "name" : "",
264           "type" : "Roo.Component",
265           "desc" : "this"
266         }
267       ]
268     },
269     {
270       "name" : "disable",
271       "desc" : "Disable this component.",
272       "isStatic" : false,
273       "isConstructor" : false,
274       "isPrivate" : false,
275       "memberOf" : "Roo.Component",
276       "example" : "",
277       "deprecated" : "",
278       "since" : "",
279       "see" : "",
280       "params" : [
281       ],
282       "returns" : [
283         {
284           "name" : "",
285           "type" : "Roo.Component",
286           "desc" : "this"
287         }
288       ]
289     },
290     {
291       "name" : "getEl",
292       "desc" : "Returns the underlying {@link Roo.Element}.",
293       "isStatic" : false,
294       "isConstructor" : false,
295       "isPrivate" : false,
296       "memberOf" : "Roo.Component",
297       "example" : "",
298       "deprecated" : "",
299       "since" : "",
300       "see" : "",
301       "params" : [
302       ],
303       "returns" : [
304         {
305           "name" : "",
306           "type" : "Roo.Element",
307           "desc" : "The element"
308         }
309       ]
310     },
311     {
312       "name" : "purgeListeners",
313       "desc" : "Removes all listeners for this object",
314       "isStatic" : false,
315       "isConstructor" : false,
316       "isPrivate" : false,
317       "memberOf" : "Roo.util.Observable",
318       "example" : "",
319       "deprecated" : "",
320       "since" : "",
321       "see" : "",
322       "params" : [
323       ],
324       "returns" : [
325       ]
326     },
327     {
328       "name" : "on",
329       "desc" : "Appends an event handler to this element (shorthand for addListener)",
330       "isStatic" : false,
331       "isConstructor" : false,
332       "isPrivate" : false,
333       "memberOf" : "Roo.util.Observable",
334       "example" : "",
335       "deprecated" : "",
336       "since" : "",
337       "see" : "",
338       "params" : [
339         {
340           "name" : "eventName",
341           "type" : "String",
342           "desc" : "The type of event to listen for",
343           "isOptional" : false
344         },
345         {
346           "name" : "handler",
347           "type" : "Function",
348           "desc" : "The method the event invokes",
349           "isOptional" : false
350         },
351         {
352           "name" : "scope",
353           "type" : "Object",
354           "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
355           "isOptional" : false
356         },
357         {
358           "name" : "options",
359           "type" : "Object",
360           "desc" : "(optional)",
361           "isOptional" : false
362         }
363       ],
364       "returns" : [
365       ]
366     },
367     {
368       "name" : "un",
369       "desc" : "Removes a listener (shorthand for removeListener)",
370       "isStatic" : false,
371       "isConstructor" : false,
372       "isPrivate" : false,
373       "memberOf" : "Roo.util.Observable",
374       "example" : "",
375       "deprecated" : "",
376       "since" : "",
377       "see" : "",
378       "params" : [
379         {
380           "name" : "eventName",
381           "type" : "String",
382           "desc" : "The type of event to listen for",
383           "isOptional" : false
384         },
385         {
386           "name" : "handler",
387           "type" : "Function",
388           "desc" : "The handler to remove",
389           "isOptional" : false
390         },
391         {
392           "name" : "scope",
393           "type" : "Object",
394           "desc" : "(optional) The scope (this object) for the handler",
395           "isOptional" : false
396         }
397       ],
398       "returns" : [
399       ]
400     },
401     {
402       "name" : "addEvents",
403       "desc" : "Used to define events on this Observable",
404       "isStatic" : false,
405       "isConstructor" : false,
406       "isPrivate" : false,
407       "memberOf" : "Roo.util.Observable",
408       "example" : "",
409       "deprecated" : "",
410       "since" : "",
411       "see" : "",
412       "params" : [
413         {
414           "name" : "object",
415           "type" : "Object",
416           "desc" : "The object with the events defined",
417           "isOptional" : false
418         }
419       ],
420       "returns" : [
421       ]
422     },
423     {
424       "name" : "releaseCapture",
425       "desc" : "Removes <b>all</b> added captures from the Observable.",
426       "isStatic" : true,
427       "isConstructor" : false,
428       "isPrivate" : false,
429       "memberOf" : "Roo.util.Observable",
430       "example" : "",
431       "deprecated" : "",
432       "since" : "",
433       "see" : "",
434       "params" : [
435         {
436           "name" : "o",
437           "type" : "Observable",
438           "desc" : "The Observable to release",
439           "isOptional" : false
440         }
441       ],
442       "returns" : [
443       ]
444     },
445     {
446       "name" : "removeListener",
447       "desc" : "Removes a listener",
448       "isStatic" : false,
449       "isConstructor" : false,
450       "isPrivate" : false,
451       "memberOf" : "Roo.util.Observable",
452       "example" : "",
453       "deprecated" : "",
454       "since" : "",
455       "see" : "",
456       "params" : [
457         {
458           "name" : "eventName",
459           "type" : "String",
460           "desc" : "The type of event to listen for",
461           "isOptional" : false
462         },
463         {
464           "name" : "handler",
465           "type" : "Function",
466           "desc" : "The handler to remove",
467           "isOptional" : false
468         },
469         {
470           "name" : "scope",
471           "type" : "Object",
472           "desc" : "(optional) The scope (this object) for the handler",
473           "isOptional" : false
474         }
475       ],
476       "returns" : [
477       ]
478     },
479     {
480       "name" : "fireEvent",
481       "desc" : "Fires the specified event with the passed parameters (minus the event name).",
482       "isStatic" : false,
483       "isConstructor" : false,
484       "isPrivate" : false,
485       "memberOf" : "Roo.util.Observable",
486       "example" : "",
487       "deprecated" : "",
488       "since" : "",
489       "see" : "",
490       "params" : [
491         {
492           "name" : "eventName",
493           "type" : "String",
494           "desc" : "",
495           "isOptional" : false
496         },
497         {
498           "name" : "args",
499           "type" : "Object...",
500           "desc" : "Variable number of parameters are passed to handlers",
501           "isOptional" : false
502         }
503       ],
504       "returns" : [
505         {
506           "name" : "",
507           "type" : "Boolean",
508           "desc" : "returns false if any of the handlers return false otherwise it returns true"
509         }
510       ]
511     },
512     {
513       "name" : "hasListener",
514       "desc" : "Checks to see if this object has any listeners for a specified event",
515       "isStatic" : false,
516       "isConstructor" : false,
517       "isPrivate" : false,
518       "memberOf" : "Roo.util.Observable",
519       "example" : "",
520       "deprecated" : "",
521       "since" : "",
522       "see" : "",
523       "params" : [
524         {
525           "name" : "eventName",
526           "type" : "String",
527           "desc" : "The name of the event to check for",
528           "isOptional" : false
529         }
530       ],
531       "returns" : [
532         {
533           "name" : "",
534           "type" : "Boolean",
535           "desc" : "True if the event is being listened for, else false"
536         }
537       ]
538     },
539     {
540       "name" : "capture",
541       "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.",
542       "isStatic" : true,
543       "isConstructor" : false,
544       "isPrivate" : false,
545       "memberOf" : "Roo.util.Observable",
546       "example" : "",
547       "deprecated" : "",
548       "since" : "",
549       "see" : "",
550       "params" : [
551         {
552           "name" : "o",
553           "type" : "Observable",
554           "desc" : "The Observable to capture",
555           "isOptional" : false
556         },
557         {
558           "name" : "fn",
559           "type" : "Function",
560           "desc" : "The function to call",
561           "isOptional" : false
562         },
563         {
564           "name" : "scope",
565           "type" : "Object",
566           "desc" : "(optional) The scope (this object) for the fn",
567           "isOptional" : false
568         }
569       ],
570       "returns" : [
571       ]
572     },
573     {
574       "name" : "addListener",
575       "desc" : "Appends an event handler to this component",
576       "isStatic" : false,
577       "isConstructor" : false,
578       "isPrivate" : false,
579       "memberOf" : "Roo.util.Observable",
580       "example" : "",
581       "deprecated" : "",
582       "since" : "",
583       "see" : "",
584       "params" : [
585         {
586           "name" : "eventName",
587           "type" : "String",
588           "desc" : "The type of event to listen for",
589           "isOptional" : false
590         },
591         {
592           "name" : "handler",
593           "type" : "Function",
594           "desc" : "The method the event invokes",
595           "isOptional" : false
596         },
597         {
598           "name" : "scope",
599           "type" : "Object",
600           "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
601           "isOptional" : false
602         },
603         {
604           "name" : "options",
605           "type" : "Object",
606           "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>",
607           "isOptional" : false
608         }
609       ],
610       "returns" : [
611       ]
612     }
613   ],
614   "events" : [
615     {
616       "name" : "beforerender",
617       "desc" : "Fires before the component is rendered. Return false to stop the render.",
618       "memberOf" : "",
619       "example" : "",
620       "deprecated" : "",
621       "since" : "",
622       "see" : "",
623       "params" : [
624         {
625           "name" : "this",
626           "type" : "Roo.Component",
627           "desc" : "",
628           "isOptional" : false
629         }
630       ],
631       "returns" : [
632       ]
633     },
634     {
635       "name" : "disable",
636       "desc" : "Fires after the component is disabled.",
637       "memberOf" : "",
638       "example" : "",
639       "deprecated" : "",
640       "since" : "",
641       "see" : "",
642       "params" : [
643         {
644           "name" : "this",
645           "type" : "Roo.Component",
646           "desc" : "",
647           "isOptional" : false
648         }
649       ],
650       "returns" : [
651       ]
652     },
653     {
654       "name" : "render",
655       "desc" : "Fires after the component is rendered.",
656       "memberOf" : "",
657       "example" : "",
658       "deprecated" : "",
659       "since" : "",
660       "see" : "",
661       "params" : [
662         {
663           "name" : "this",
664           "type" : "Roo.Component",
665           "desc" : "",
666           "isOptional" : false
667         }
668       ],
669       "returns" : [
670       ]
671     },
672     {
673       "name" : "destroy",
674       "desc" : "Fires after the component is destroyed.",
675       "memberOf" : "",
676       "example" : "",
677       "deprecated" : "",
678       "since" : "",
679       "see" : "",
680       "params" : [
681         {
682           "name" : "this",
683           "type" : "Roo.Component",
684           "desc" : "",
685           "isOptional" : false
686         }
687       ],
688       "returns" : [
689       ]
690     },
691     {
692       "name" : "hide",
693       "desc" : "Fires after the component is hidden.",
694       "memberOf" : "",
695       "example" : "",
696       "deprecated" : "",
697       "since" : "",
698       "see" : "",
699       "params" : [
700         {
701           "name" : "this",
702           "type" : "Roo.Component",
703           "desc" : "",
704           "isOptional" : false
705         }
706       ],
707       "returns" : [
708       ]
709     },
710     {
711       "name" : "beforehide",
712       "desc" : "Fires before the component is hidden. Return false to stop the hide.",
713       "memberOf" : "",
714       "example" : "",
715       "deprecated" : "",
716       "since" : "",
717       "see" : "",
718       "params" : [
719         {
720           "name" : "this",
721           "type" : "Roo.Component",
722           "desc" : "",
723           "isOptional" : false
724         }
725       ],
726       "returns" : [
727       ]
728     },
729     {
730       "name" : "show",
731       "desc" : "Fires after the component is shown.",
732       "memberOf" : "",
733       "example" : "",
734       "deprecated" : "",
735       "since" : "",
736       "see" : "",
737       "params" : [
738         {
739           "name" : "this",
740           "type" : "Roo.Component",
741           "desc" : "",
742           "isOptional" : false
743         }
744       ],
745       "returns" : [
746       ]
747     },
748     {
749       "name" : "beforeshow",
750       "desc" : "Fires before the component is shown.  Return false to stop the show.",
751       "memberOf" : "",
752       "example" : "",
753       "deprecated" : "",
754       "since" : "",
755       "see" : "",
756       "params" : [
757         {
758           "name" : "this",
759           "type" : "Roo.Component",
760           "desc" : "",
761           "isOptional" : false
762         }
763       ],
764       "returns" : [
765       ]
766     },
767     {
768       "name" : "enable",
769       "desc" : "Fires after the component is enabled.",
770       "memberOf" : "",
771       "example" : "",
772       "deprecated" : "",
773       "since" : "",
774       "see" : "",
775       "params" : [
776         {
777           "name" : "this",
778           "type" : "Roo.Component",
779           "desc" : "",
780           "isOptional" : false
781         }
782       ],
783       "returns" : [
784       ]
785     },
786     {
787       "name" : "beforedestroy",
788       "desc" : "Fires before the component is destroyed. Return false to stop the destroy.",
789       "memberOf" : "",
790       "example" : "",
791       "deprecated" : "",
792       "since" : "",
793       "see" : "",
794       "params" : [
795         {
796           "name" : "this",
797           "type" : "Roo.Component",
798           "desc" : "",
799           "isOptional" : false
800         }
801       ],
802       "returns" : [
803       ]
804     }
805   ]
806 }