Partial Fix #5654 - roojspacker - get it working as a doc tool...
[roojs1] / docs2 / symbols / Roo.bootstrap.panel.Tabs.json
1 {
2   "name" : "Roo.bootstrap.panel.Tabs",
3   "augments" : [
4     "Roo.util.Observable"
5   ],
6   "desc" : "A lightweight tab container.\n<br><br>\nUsage:\n<pre><code>\n// basic tabs 1, built from existing content\nvar tabs = new Roo.TabPanel(\"tabs1\");\ntabs.addTab(\"script\", \"View Script\");\ntabs.addTab(\"markup\", \"View Markup\");\ntabs.activate(\"script\");\n\n// more advanced tabs, built from javascript\nvar jtabs = new Roo.TabPanel(\"jtabs\");\njtabs.addTab(\"jtabs-1\", \"Normal Tab\", \"My content was added during construction.\");\n\n// set up the UpdateManager\nvar tab2 = jtabs.addTab(\"jtabs-2\", \"Ajax Tab 1\");\nvar updater = tab2.getUpdateManager();\nupdater.setDefaultUrl(\"ajax1.htm\");\ntab2.on('activate', updater.refresh, updater, true);\n\n// Use setUrl for Ajax loading\nvar tab3 = jtabs.addTab(\"jtabs-3\", \"Ajax Tab 2\");\ntab3.setUrl(\"ajax2.htm\", null, true);\n\n// Disabled tab\nvar tab4 = jtabs.addTab(\"tabs1-5\", \"Disabled Tab\", \"Can't see me cause I'm disabled\");\ntab4.disable();\n\njtabs.activate(\"jtabs-1\");\n</code></pre>",
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   "methods" : [
21     {
22       "name" : "setTabWidth",
23       "desc" : "Resizes all the tabs to the passed width",
24       "isStatic" : false,
25       "isConstructor" : false,
26       "isPrivate" : false,
27       "memberOf" : "Roo.bootstrap.panel.Tabs",
28       "example" : "",
29       "deprecated" : "",
30       "since" : "",
31       "see" : "",
32       "params" : [
33         {
34           "name" : "The",
35           "type" : "Number",
36           "desc" : "new width",
37           "isOptional" : false
38         }
39       ],
40       "returns" : [
41       ]
42     },
43     {
44       "name" : "endUpdate",
45       "desc" : "Stops an update and resizes the tabs (if {@link #resizeTabs} is false this does nothing)",
46       "isStatic" : false,
47       "isConstructor" : false,
48       "isPrivate" : false,
49       "memberOf" : "Roo.bootstrap.panel.Tabs",
50       "example" : "",
51       "deprecated" : "",
52       "since" : "",
53       "see" : "",
54       "params" : [
55       ],
56       "returns" : [
57       ]
58     },
59     {
60       "name" : "disableTab",
61       "desc" : "Disables a {@link Roo.TabPanelItem}. It cannot be the active tab, if it is this call is ignored.",
62       "isStatic" : false,
63       "isConstructor" : false,
64       "isPrivate" : false,
65       "memberOf" : "Roo.bootstrap.panel.Tabs",
66       "example" : "",
67       "deprecated" : "",
68       "since" : "",
69       "see" : "",
70       "params" : [
71         {
72           "name" : "id",
73           "type" : "String/Number",
74           "desc" : "The id or index of the TabPanelItem to disable.",
75           "isOptional" : false
76         }
77       ],
78       "returns" : [
79       ]
80     },
81     {
82       "name" : "getTab",
83       "desc" : "Returns the {@link Roo.TabPanelItem} with the specified id/index",
84       "isStatic" : false,
85       "isConstructor" : false,
86       "isPrivate" : false,
87       "memberOf" : "Roo.bootstrap.panel.Tabs",
88       "example" : "",
89       "deprecated" : "",
90       "since" : "",
91       "see" : "",
92       "params" : [
93         {
94           "name" : "id",
95           "type" : "String/Number",
96           "desc" : "The id or index of the TabPanelItem to fetch.",
97           "isOptional" : false
98         }
99       ],
100       "returns" : [
101         {
102           "name" : "",
103           "type" : "Roo.TabPanelItem",
104           "desc" : ""
105         }
106       ]
107     },
108     {
109       "name" : "unhideTab",
110       "desc" : "\"Unhides\" the {@link Roo.TabPanelItem} with the specified id/index.",
111       "isStatic" : false,
112       "isConstructor" : false,
113       "isPrivate" : false,
114       "memberOf" : "Roo.bootstrap.panel.Tabs",
115       "example" : "",
116       "deprecated" : "",
117       "since" : "",
118       "see" : "",
119       "params" : [
120         {
121           "name" : "id",
122           "type" : "String/Number",
123           "desc" : "The id or index of the TabPanelItem to unhide.",
124           "isOptional" : false
125         }
126       ],
127       "returns" : [
128       ]
129     },
130     {
131       "name" : "beginUpdate",
132       "desc" : "Disables tab resizing while tabs are being added (if {@link #resizeTabs} is false this does nothing)",
133       "isStatic" : false,
134       "isConstructor" : false,
135       "isPrivate" : false,
136       "memberOf" : "Roo.bootstrap.panel.Tabs",
137       "example" : "",
138       "deprecated" : "",
139       "since" : "",
140       "see" : "",
141       "params" : [
142       ],
143       "returns" : [
144       ]
145     },
146     {
147       "name" : "enableTab",
148       "desc" : "Enables a {@link Roo.TabPanelItem} that is disabled.",
149       "isStatic" : false,
150       "isConstructor" : false,
151       "isPrivate" : false,
152       "memberOf" : "Roo.bootstrap.panel.Tabs",
153       "example" : "",
154       "deprecated" : "",
155       "since" : "",
156       "see" : "",
157       "params" : [
158         {
159           "name" : "id",
160           "type" : "String/Number",
161           "desc" : "The id or index of the TabPanelItem to enable.",
162           "isOptional" : false
163         }
164       ],
165       "returns" : [
166       ]
167     },
168     {
169       "name" : "getCount",
170       "desc" : "Returns the number of tabs in this TabPanel.",
171       "isStatic" : false,
172       "isConstructor" : false,
173       "isPrivate" : false,
174       "memberOf" : "Roo.bootstrap.panel.Tabs",
175       "example" : "",
176       "deprecated" : "",
177       "since" : "",
178       "see" : "",
179       "params" : [
180       ],
181       "returns" : [
182         {
183           "name" : "",
184           "type" : "Number",
185           "desc" : ""
186         }
187       ]
188     },
189     {
190       "name" : "destroy",
191       "desc" : "Destroys this TabPanel",
192       "isStatic" : false,
193       "isConstructor" : false,
194       "isPrivate" : false,
195       "memberOf" : "Roo.bootstrap.panel.Tabs",
196       "example" : "",
197       "deprecated" : "",
198       "since" : "",
199       "see" : "",
200       "params" : [
201         {
202           "name" : "removeEl",
203           "type" : "Boolean",
204           "desc" : "(optional) True to remove the element from the DOM as well (defaults to undefined)",
205           "isOptional" : false
206         }
207       ],
208       "returns" : [
209       ]
210     },
211     {
212       "name" : "syncHeight",
213       "desc" : "Updates the tab body element to fit the height of the container element\nfor overflow scrolling",
214       "isStatic" : false,
215       "isConstructor" : false,
216       "isPrivate" : false,
217       "memberOf" : "Roo.bootstrap.panel.Tabs",
218       "example" : "",
219       "deprecated" : "",
220       "since" : "",
221       "see" : "",
222       "params" : [
223         {
224           "name" : "targetHeight",
225           "type" : "Number",
226           "desc" : "(optional) Override the starting height from the elements height",
227           "isOptional" : false
228         }
229       ],
230       "returns" : [
231       ]
232     },
233     {
234       "name" : "activate",
235       "desc" : "Activates a {@link Roo.TabPanelItem}. The currently active one will be deactivated.",
236       "isStatic" : false,
237       "isConstructor" : false,
238       "isPrivate" : false,
239       "memberOf" : "Roo.bootstrap.panel.Tabs",
240       "example" : "",
241       "deprecated" : "",
242       "since" : "",
243       "see" : "",
244       "params" : [
245         {
246           "name" : "id",
247           "type" : "String/Number",
248           "desc" : "The id or index of the TabPanelItem to activate.",
249           "isOptional" : false
250         }
251       ],
252       "returns" : [
253         {
254           "name" : "",
255           "type" : "Roo.TabPanelItem",
256           "desc" : "The TabPanelItem."
257         }
258       ]
259     },
260     {
261       "name" : "autoSizeTabs",
262       "desc" : "Manual call to resize the tabs (if {@link #resizeTabs} is false this does nothing)",
263       "isStatic" : false,
264       "isConstructor" : false,
265       "isPrivate" : false,
266       "memberOf" : "Roo.bootstrap.panel.Tabs",
267       "example" : "",
268       "deprecated" : "",
269       "since" : "",
270       "see" : "",
271       "params" : [
272       ],
273       "returns" : [
274       ]
275     },
276     {
277       "name" : "addTabItem",
278       "desc" : "Adds an existing {@link Roo.TabPanelItem}.",
279       "isStatic" : false,
280       "isConstructor" : false,
281       "isPrivate" : false,
282       "memberOf" : "Roo.bootstrap.panel.Tabs",
283       "example" : "",
284       "deprecated" : "",
285       "since" : "",
286       "see" : "",
287       "params" : [
288         {
289           "name" : "item",
290           "type" : "Roo.TabPanelItem",
291           "desc" : "The TabPanelItem to add",
292           "isOptional" : false
293         }
294       ],
295       "returns" : [
296       ]
297     },
298     {
299       "name" : "addTab",
300       "desc" : "Creates a new {@link Roo.TabPanelItem} by looking for an existing element with the provided id -- if it's not found it creates one.",
301       "isStatic" : false,
302       "isConstructor" : false,
303       "isPrivate" : false,
304       "memberOf" : "Roo.bootstrap.panel.Tabs",
305       "example" : "",
306       "deprecated" : "",
307       "since" : "",
308       "see" : "",
309       "params" : [
310         {
311           "name" : "id",
312           "type" : "String",
313           "desc" : "The id of the div to use <b>or create</b>",
314           "isOptional" : false
315         },
316         {
317           "name" : "text",
318           "type" : "String",
319           "desc" : "The text for the tab",
320           "isOptional" : false
321         },
322         {
323           "name" : "content",
324           "type" : "String",
325           "desc" : "(optional) Content to put in the TabPanelItem body",
326           "isOptional" : false
327         },
328         {
329           "name" : "closable",
330           "type" : "Boolean",
331           "desc" : "(optional) True to create a close icon on the tab",
332           "isOptional" : false
333         }
334       ],
335       "returns" : [
336         {
337           "name" : "",
338           "type" : "Roo.TabPanelItem",
339           "desc" : "The created TabPanelItem"
340         }
341       ]
342     },
343     {
344       "name" : "removeTab",
345       "desc" : "Removes a {@link Roo.TabPanelItem}.",
346       "isStatic" : false,
347       "isConstructor" : false,
348       "isPrivate" : false,
349       "memberOf" : "Roo.bootstrap.panel.Tabs",
350       "example" : "",
351       "deprecated" : "",
352       "since" : "",
353       "see" : "",
354       "params" : [
355         {
356           "name" : "id",
357           "type" : "String/Number",
358           "desc" : "The id or index of the TabPanelItem to remove.",
359           "isOptional" : false
360         }
361       ],
362       "returns" : [
363       ]
364     },
365     {
366       "name" : "hideTab",
367       "desc" : "Hides the {@link Roo.TabPanelItem} with the specified id/index",
368       "isStatic" : false,
369       "isConstructor" : false,
370       "isPrivate" : false,
371       "memberOf" : "Roo.bootstrap.panel.Tabs",
372       "example" : "",
373       "deprecated" : "",
374       "since" : "",
375       "see" : "",
376       "params" : [
377         {
378           "name" : "id",
379           "type" : "String/Number",
380           "desc" : "The id or index of the TabPanelItem to hide.",
381           "isOptional" : false
382         }
383       ],
384       "returns" : [
385       ]
386     },
387     {
388       "name" : "getActiveTab",
389       "desc" : "Gets the active {@link Roo.TabPanelItem}.",
390       "isStatic" : false,
391       "isConstructor" : false,
392       "isPrivate" : false,
393       "memberOf" : "Roo.bootstrap.panel.Tabs",
394       "example" : "",
395       "deprecated" : "",
396       "since" : "",
397       "see" : "",
398       "params" : [
399       ],
400       "returns" : [
401         {
402           "name" : "",
403           "type" : "Roo.TabPanelItem",
404           "desc" : "The active TabPanelItem or null if none are active."
405         }
406       ]
407     },
408     {
409       "name" : "purgeListeners",
410       "desc" : "Removes all listeners for this object",
411       "isStatic" : false,
412       "isConstructor" : false,
413       "isPrivate" : false,
414       "memberOf" : "Roo.util.Observable",
415       "example" : "",
416       "deprecated" : "",
417       "since" : "",
418       "see" : "",
419       "params" : [
420       ],
421       "returns" : [
422       ]
423     },
424     {
425       "name" : "on",
426       "desc" : "Appends an event handler to this element (shorthand for addListener)",
427       "isStatic" : false,
428       "isConstructor" : false,
429       "isPrivate" : false,
430       "memberOf" : "Roo.util.Observable",
431       "example" : "",
432       "deprecated" : "",
433       "since" : "",
434       "see" : "",
435       "params" : [
436         {
437           "name" : "eventName",
438           "type" : "String",
439           "desc" : "The type of event to listen for",
440           "isOptional" : false
441         },
442         {
443           "name" : "handler",
444           "type" : "Function",
445           "desc" : "The method the event invokes",
446           "isOptional" : false
447         },
448         {
449           "name" : "scope",
450           "type" : "Object",
451           "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
452           "isOptional" : false
453         },
454         {
455           "name" : "options",
456           "type" : "Object",
457           "desc" : "(optional)",
458           "isOptional" : false
459         }
460       ],
461       "returns" : [
462       ]
463     },
464     {
465       "name" : "un",
466       "desc" : "Removes a listener (shorthand for removeListener)",
467       "isStatic" : false,
468       "isConstructor" : false,
469       "isPrivate" : false,
470       "memberOf" : "Roo.util.Observable",
471       "example" : "",
472       "deprecated" : "",
473       "since" : "",
474       "see" : "",
475       "params" : [
476         {
477           "name" : "eventName",
478           "type" : "String",
479           "desc" : "The type of event to listen for",
480           "isOptional" : false
481         },
482         {
483           "name" : "handler",
484           "type" : "Function",
485           "desc" : "The handler to remove",
486           "isOptional" : false
487         },
488         {
489           "name" : "scope",
490           "type" : "Object",
491           "desc" : "(optional) The scope (this object) for the handler",
492           "isOptional" : false
493         }
494       ],
495       "returns" : [
496       ]
497     },
498     {
499       "name" : "addEvents",
500       "desc" : "Used to define events on this Observable",
501       "isStatic" : false,
502       "isConstructor" : false,
503       "isPrivate" : false,
504       "memberOf" : "Roo.util.Observable",
505       "example" : "",
506       "deprecated" : "",
507       "since" : "",
508       "see" : "",
509       "params" : [
510         {
511           "name" : "object",
512           "type" : "Object",
513           "desc" : "The object with the events defined",
514           "isOptional" : false
515         }
516       ],
517       "returns" : [
518       ]
519     },
520     {
521       "name" : "releaseCapture",
522       "desc" : "Removes <b>all</b> added captures from the Observable.",
523       "isStatic" : true,
524       "isConstructor" : false,
525       "isPrivate" : false,
526       "memberOf" : "Roo.util.Observable",
527       "example" : "",
528       "deprecated" : "",
529       "since" : "",
530       "see" : "",
531       "params" : [
532         {
533           "name" : "o",
534           "type" : "Observable",
535           "desc" : "The Observable to release",
536           "isOptional" : false
537         }
538       ],
539       "returns" : [
540       ]
541     },
542     {
543       "name" : "removeListener",
544       "desc" : "Removes a listener",
545       "isStatic" : false,
546       "isConstructor" : false,
547       "isPrivate" : false,
548       "memberOf" : "Roo.util.Observable",
549       "example" : "",
550       "deprecated" : "",
551       "since" : "",
552       "see" : "",
553       "params" : [
554         {
555           "name" : "eventName",
556           "type" : "String",
557           "desc" : "The type of event to listen for",
558           "isOptional" : false
559         },
560         {
561           "name" : "handler",
562           "type" : "Function",
563           "desc" : "The handler to remove",
564           "isOptional" : false
565         },
566         {
567           "name" : "scope",
568           "type" : "Object",
569           "desc" : "(optional) The scope (this object) for the handler",
570           "isOptional" : false
571         }
572       ],
573       "returns" : [
574       ]
575     },
576     {
577       "name" : "fireEvent",
578       "desc" : "Fires the specified event with the passed parameters (minus the event name).",
579       "isStatic" : false,
580       "isConstructor" : false,
581       "isPrivate" : false,
582       "memberOf" : "Roo.util.Observable",
583       "example" : "",
584       "deprecated" : "",
585       "since" : "",
586       "see" : "",
587       "params" : [
588         {
589           "name" : "eventName",
590           "type" : "String",
591           "desc" : "",
592           "isOptional" : false
593         },
594         {
595           "name" : "args",
596           "type" : "Object...",
597           "desc" : "Variable number of parameters are passed to handlers",
598           "isOptional" : false
599         }
600       ],
601       "returns" : [
602         {
603           "name" : "",
604           "type" : "Boolean",
605           "desc" : "returns false if any of the handlers return false otherwise it returns true"
606         }
607       ]
608     },
609     {
610       "name" : "hasListener",
611       "desc" : "Checks to see if this object has any listeners for a specified event",
612       "isStatic" : false,
613       "isConstructor" : false,
614       "isPrivate" : false,
615       "memberOf" : "Roo.util.Observable",
616       "example" : "",
617       "deprecated" : "",
618       "since" : "",
619       "see" : "",
620       "params" : [
621         {
622           "name" : "eventName",
623           "type" : "String",
624           "desc" : "The name of the event to check for",
625           "isOptional" : false
626         }
627       ],
628       "returns" : [
629         {
630           "name" : "",
631           "type" : "Boolean",
632           "desc" : "True if the event is being listened for, else false"
633         }
634       ]
635     },
636     {
637       "name" : "capture",
638       "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.",
639       "isStatic" : true,
640       "isConstructor" : false,
641       "isPrivate" : false,
642       "memberOf" : "Roo.util.Observable",
643       "example" : "",
644       "deprecated" : "",
645       "since" : "",
646       "see" : "",
647       "params" : [
648         {
649           "name" : "o",
650           "type" : "Observable",
651           "desc" : "The Observable to capture",
652           "isOptional" : false
653         },
654         {
655           "name" : "fn",
656           "type" : "Function",
657           "desc" : "The function to call",
658           "isOptional" : false
659         },
660         {
661           "name" : "scope",
662           "type" : "Object",
663           "desc" : "(optional) The scope (this object) for the fn",
664           "isOptional" : false
665         }
666       ],
667       "returns" : [
668       ]
669     },
670     {
671       "name" : "addListener",
672       "desc" : "Appends an event handler to this component",
673       "isStatic" : false,
674       "isConstructor" : false,
675       "isPrivate" : false,
676       "memberOf" : "Roo.util.Observable",
677       "example" : "",
678       "deprecated" : "",
679       "since" : "",
680       "see" : "",
681       "params" : [
682         {
683           "name" : "eventName",
684           "type" : "String",
685           "desc" : "The type of event to listen for",
686           "isOptional" : false
687         },
688         {
689           "name" : "handler",
690           "type" : "Function",
691           "desc" : "The method the event invokes",
692           "isOptional" : false
693         },
694         {
695           "name" : "scope",
696           "type" : "Object",
697           "desc" : "(optional) The scope in which to execute the handler\nfunction. The handler function's \"this\" context.",
698           "isOptional" : false
699         },
700         {
701           "name" : "options",
702           "type" : "Object",
703           "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>",
704           "isOptional" : false
705         }
706       ],
707       "returns" : [
708       ]
709     }
710   ],
711   "events" : [
712     {
713       "name" : "tabchange",
714       "desc" : "Fires when the active tab changes",
715       "memberOf" : "",
716       "example" : "",
717       "deprecated" : "",
718       "since" : "",
719       "see" : "",
720       "params" : [
721         {
722           "name" : "this",
723           "type" : "Roo.TabPanel",
724           "desc" : "",
725           "isOptional" : false
726         },
727         {
728           "name" : "activePanel",
729           "type" : "Roo.TabPanelItem",
730           "desc" : "The new active tab",
731           "isOptional" : false
732         }
733       ],
734       "returns" : [
735       ]
736     },
737     {
738       "name" : "beforetabchange",
739       "desc" : "Fires before the active tab changes, set cancel to true on the \"e\" parameter to cancel the change",
740       "memberOf" : "",
741       "example" : "",
742       "deprecated" : "",
743       "since" : "",
744       "see" : "",
745       "params" : [
746         {
747           "name" : "this",
748           "type" : "Roo.TabPanel",
749           "desc" : "",
750           "isOptional" : false
751         },
752         {
753           "name" : "e",
754           "type" : "Object",
755           "desc" : "Set cancel to true on this object to cancel the tab change",
756           "isOptional" : false
757         },
758         {
759           "name" : "tab",
760           "type" : "Roo.TabPanelItem",
761           "desc" : "The tab being changed to",
762           "isOptional" : false
763         }
764       ],
765       "returns" : [
766       ]
767     }
768   ]
769 }