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