Partial Fix #5654 - roojspacker - get it working as a doc tool...
[roojs1] / docs2 / symbols / Roo.TabPanel.json
1 {
2   "name" : "Roo.TabPanel",
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" : "getActiveTab",
23       "desc" : "Gets the active {@link Roo.TabPanelItem}.",
24       "isStatic" : false,
25       "isConstructor" : false,
26       "isPrivate" : false,
27       "memberOf" : "Roo.TabPanel",
28       "example" : "",
29       "deprecated" : "",
30       "since" : "",
31       "see" : "",
32       "params" : [
33       ],
34       "returns" : [
35         {
36           "name" : "",
37           "type" : "Roo.TabPanelItem",
38           "desc" : "The active TabPanelItem or null if none are active."
39         }
40       ]
41     },
42     {
43       "name" : "beginUpdate",
44       "desc" : "Disables tab resizing while tabs are being added (if {@link #resizeTabs} is false this does nothing)",
45       "isStatic" : false,
46       "isConstructor" : false,
47       "isPrivate" : false,
48       "memberOf" : "Roo.TabPanel",
49       "example" : "",
50       "deprecated" : "",
51       "since" : "",
52       "see" : "",
53       "params" : [
54       ],
55       "returns" : [
56       ]
57     },
58     {
59       "name" : "unhideTab",
60       "desc" : "\"Unhides\" the {@link Roo.TabPanelItem} with the specified id/index.",
61       "isStatic" : false,
62       "isConstructor" : false,
63       "isPrivate" : false,
64       "memberOf" : "Roo.TabPanel",
65       "example" : "",
66       "deprecated" : "",
67       "since" : "",
68       "see" : "",
69       "params" : [
70         {
71           "name" : "id",
72           "type" : "String/Number",
73           "desc" : "The id or index of the TabPanelItem to unhide.",
74           "isOptional" : false
75         }
76       ],
77       "returns" : [
78       ]
79     },
80     {
81       "name" : "enableTab",
82       "desc" : "Enables a {@link Roo.TabPanelItem} that is disabled.",
83       "isStatic" : false,
84       "isConstructor" : false,
85       "isPrivate" : false,
86       "memberOf" : "Roo.TabPanel",
87       "example" : "",
88       "deprecated" : "",
89       "since" : "",
90       "see" : "",
91       "params" : [
92         {
93           "name" : "id",
94           "type" : "String/Number",
95           "desc" : "The id or index of the TabPanelItem to enable.",
96           "isOptional" : false
97         }
98       ],
99       "returns" : [
100       ]
101     },
102     {
103       "name" : "setTabWidth",
104       "desc" : "Resizes all the tabs to the passed width",
105       "isStatic" : false,
106       "isConstructor" : false,
107       "isPrivate" : false,
108       "memberOf" : "Roo.TabPanel",
109       "example" : "",
110       "deprecated" : "",
111       "since" : "",
112       "see" : "",
113       "params" : [
114         {
115           "name" : "The",
116           "type" : "Number",
117           "desc" : "new width",
118           "isOptional" : false
119         }
120       ],
121       "returns" : [
122       ]
123     },
124     {
125       "name" : "endUpdate",
126       "desc" : "Stops an update and resizes the tabs (if {@link #resizeTabs} is false this does nothing)",
127       "isStatic" : false,
128       "isConstructor" : false,
129       "isPrivate" : false,
130       "memberOf" : "Roo.TabPanel",
131       "example" : "",
132       "deprecated" : "",
133       "since" : "",
134       "see" : "",
135       "params" : [
136       ],
137       "returns" : [
138       ]
139     },
140     {
141       "name" : "addTab",
142       "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.",
143       "isStatic" : false,
144       "isConstructor" : false,
145       "isPrivate" : false,
146       "memberOf" : "Roo.TabPanel",
147       "example" : "",
148       "deprecated" : "",
149       "since" : "",
150       "see" : "",
151       "params" : [
152         {
153           "name" : "id",
154           "type" : "String",
155           "desc" : "The id of the div to use <b>or create</b>",
156           "isOptional" : false
157         },
158         {
159           "name" : "text",
160           "type" : "String",
161           "desc" : "The text for the tab",
162           "isOptional" : false
163         },
164         {
165           "name" : "content",
166           "type" : "String",
167           "desc" : "(optional) Content to put in the TabPanelItem body",
168           "isOptional" : false
169         },
170         {
171           "name" : "closable",
172           "type" : "Boolean",
173           "desc" : "(optional) True to create a close icon on the tab",
174           "isOptional" : false
175         }
176       ],
177       "returns" : [
178         {
179           "name" : "",
180           "type" : "Roo.TabPanelItem",
181           "desc" : "The created TabPanelItem"
182         }
183       ]
184     },
185     {
186       "name" : "disableTab",
187       "desc" : "Disables a {@link Roo.TabPanelItem}. It cannot be the active tab, if it is this call is ignored.",
188       "isStatic" : false,
189       "isConstructor" : false,
190       "isPrivate" : false,
191       "memberOf" : "Roo.TabPanel",
192       "example" : "",
193       "deprecated" : "",
194       "since" : "",
195       "see" : "",
196       "params" : [
197         {
198           "name" : "id",
199           "type" : "String/Number",
200           "desc" : "The id or index of the TabPanelItem to disable.",
201           "isOptional" : false
202         }
203       ],
204       "returns" : [
205       ]
206     },
207     {
208       "name" : "destroy",
209       "desc" : "Destroys this TabPanel",
210       "isStatic" : false,
211       "isConstructor" : false,
212       "isPrivate" : false,
213       "memberOf" : "Roo.TabPanel",
214       "example" : "",
215       "deprecated" : "",
216       "since" : "",
217       "see" : "",
218       "params" : [
219         {
220           "name" : "removeEl",
221           "type" : "Boolean",
222           "desc" : "(optional) True to remove the element from the DOM as well (defaults to undefined)",
223           "isOptional" : false
224         }
225       ],
226       "returns" : [
227       ]
228     },
229     {
230       "name" : "getTab",
231       "desc" : "Returns the {@link Roo.TabPanelItem} with the specified id/index",
232       "isStatic" : false,
233       "isConstructor" : false,
234       "isPrivate" : false,
235       "memberOf" : "Roo.TabPanel",
236       "example" : "",
237       "deprecated" : "",
238       "since" : "",
239       "see" : "",
240       "params" : [
241         {
242           "name" : "id",
243           "type" : "String/Number",
244           "desc" : "The id or index of the TabPanelItem to fetch.",
245           "isOptional" : false
246         }
247       ],
248       "returns" : [
249         {
250           "name" : "",
251           "type" : "Roo.TabPanelItem",
252           "desc" : ""
253         }
254       ]
255     },
256     {
257       "name" : "getCount",
258       "desc" : "Returns the number of tabs in this TabPanel.",
259       "isStatic" : false,
260       "isConstructor" : false,
261       "isPrivate" : false,
262       "memberOf" : "Roo.TabPanel",
263       "example" : "",
264       "deprecated" : "",
265       "since" : "",
266       "see" : "",
267       "params" : [
268       ],
269       "returns" : [
270         {
271           "name" : "",
272           "type" : "Number",
273           "desc" : ""
274         }
275       ]
276     },
277     {
278       "name" : "autoSizeTabs",
279       "desc" : "Manual call to resize the tabs (if {@link #resizeTabs} is false this does nothing)",
280       "isStatic" : false,
281       "isConstructor" : false,
282       "isPrivate" : false,
283       "memberOf" : "Roo.TabPanel",
284       "example" : "",
285       "deprecated" : "",
286       "since" : "",
287       "see" : "",
288       "params" : [
289       ],
290       "returns" : [
291       ]
292     },
293     {
294       "name" : "removeTab",
295       "desc" : "Removes a {@link Roo.TabPanelItem}.",
296       "isStatic" : false,
297       "isConstructor" : false,
298       "isPrivate" : false,
299       "memberOf" : "Roo.TabPanel",
300       "example" : "",
301       "deprecated" : "",
302       "since" : "",
303       "see" : "",
304       "params" : [
305         {
306           "name" : "id",
307           "type" : "String/Number",
308           "desc" : "The id or index of the TabPanelItem to remove.",
309           "isOptional" : false
310         }
311       ],
312       "returns" : [
313       ]
314     },
315     {
316       "name" : "activate",
317       "desc" : "Activates a {@link Roo.TabPanelItem}. The currently active one will be deactivated.",
318       "isStatic" : false,
319       "isConstructor" : false,
320       "isPrivate" : false,
321       "memberOf" : "Roo.TabPanel",
322       "example" : "",
323       "deprecated" : "",
324       "since" : "",
325       "see" : "",
326       "params" : [
327         {
328           "name" : "id",
329           "type" : "String/Number",
330           "desc" : "The id or index of the TabPanelItem to activate.",
331           "isOptional" : false
332         }
333       ],
334       "returns" : [
335         {
336           "name" : "",
337           "type" : "Roo.TabPanelItem",
338           "desc" : "The TabPanelItem."
339         }
340       ]
341     },
342     {
343       "name" : "syncHeight",
344       "desc" : "Updates the tab body element to fit the height of the container element\nfor overflow scrolling",
345       "isStatic" : false,
346       "isConstructor" : false,
347       "isPrivate" : false,
348       "memberOf" : "Roo.TabPanel",
349       "example" : "",
350       "deprecated" : "",
351       "since" : "",
352       "see" : "",
353       "params" : [
354         {
355           "name" : "targetHeight",
356           "type" : "Number",
357           "desc" : "(optional) Override the starting height from the elements height",
358           "isOptional" : false
359         }
360       ],
361       "returns" : [
362       ]
363     },
364     {
365       "name" : "addTabItem",
366       "desc" : "Adds an existing {@link Roo.TabPanelItem}.",
367       "isStatic" : false,
368       "isConstructor" : false,
369       "isPrivate" : false,
370       "memberOf" : "Roo.TabPanel",
371       "example" : "",
372       "deprecated" : "",
373       "since" : "",
374       "see" : "",
375       "params" : [
376         {
377           "name" : "item",
378           "type" : "Roo.TabPanelItem",
379           "desc" : "The TabPanelItem to add",
380           "isOptional" : false
381         }
382       ],
383       "returns" : [
384       ]
385     },
386     {
387       "name" : "hideTab",
388       "desc" : "Hides the {@link Roo.TabPanelItem} with the specified id/index",
389       "isStatic" : false,
390       "isConstructor" : false,
391       "isPrivate" : false,
392       "memberOf" : "Roo.TabPanel",
393       "example" : "",
394       "deprecated" : "",
395       "since" : "",
396       "see" : "",
397       "params" : [
398         {
399           "name" : "id",
400           "type" : "String/Number",
401           "desc" : "The id or index of the TabPanelItem to hide.",
402           "isOptional" : false
403         }
404       ],
405       "returns" : [
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" : "beforetabchange",
714       "desc" : "Fires before the active tab changes, set cancel to true on the \"e\" parameter to cancel the change",
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" : "e",
729           "type" : "Object",
730           "desc" : "Set cancel to true on this object to cancel the tab change",
731           "isOptional" : false
732         },
733         {
734           "name" : "tab",
735           "type" : "Roo.TabPanelItem",
736           "desc" : "The tab being changed to",
737           "isOptional" : false
738         }
739       ],
740       "returns" : [
741       ]
742     },
743     {
744       "name" : "tabchange",
745       "desc" : "Fires when the active tab changes",
746       "memberOf" : "",
747       "example" : "",
748       "deprecated" : "",
749       "since" : "",
750       "see" : "",
751       "params" : [
752         {
753           "name" : "this",
754           "type" : "Roo.TabPanel",
755           "desc" : "",
756           "isOptional" : false
757         },
758         {
759           "name" : "activePanel",
760           "type" : "Roo.TabPanelItem",
761           "desc" : "The new active tab",
762           "isOptional" : false
763         }
764       ],
765       "returns" : [
766       ]
767     }
768   ]
769 }