Extends: Object
Implements: Options, Events
A TabSet manages a set of Jx.Button.Tab content areas by ensuring that only one of the content areas is visible (i.e. the active tab). TabSet does not manage the actual tabs. The instances of Jx.Button.Tab that are to be managed as a set have to be added to both a TabSet and a Jx.Toolbar. The content areas of the Jx.Button.Tabs are sized to fit the content area that the TabSet is managing.
var tabBar = new Jx.Toolbar('tabBar');
var tabSet = new Jx.TabSet('tabArea');
var tab1 = new Jx.Button.Tab('tab 1', {contentID: 'content1'});
var tab2 = new Jx.Button.Tab('tab 2', {contentID: 'content2'});
var tab3 = new Jx.Button.Tab('tab 3', {contentID: 'content3'});
var tab4 = new Jx.Button.Tab('tab 4', {contentURL: 'test_content.html'});
tabSet.add(t1, t2, t3, t4);
tabBar.add(t1, t2, t3, t4);| tabChange | the current tab has changed |
Copyright © 2008, DM Solutions Group Inc.
This file is licensed under an MIT style license
| Jx. | Extends: Object |
| Properties | |
| tabs | {Array} array of tabs that are managed by this tab set |
| domObj | {HTMLElement} The HTML element that represents this tab set in the DOM. |
| Constructor | |
| Jx. | Create a new instance of Jx.TabSet within a specific element of the DOM. |
| Functions | |
| resizeTabBox | Resize the tab set content area and propogate the changes to each of the tabs managed by the tab set. |
| add | Add one or more Jx.Button.Tabs to the TabSet. |
| remove | Remove a tab from this TabSet. |
| setActiveTab | Set the active tab to the one passed to this method |
Create a new instance of Jx.TabSet within a specific element of the DOM.
| domObj | {HTMLElement} an element or id of an element to put the content of the tabs into. |
| options | an options object, only event handlers are supported as options at this time. |
add: function()
Add one or more Jx.Button.Tabs to the TabSet.
| tab | {<Jx.Tab>} an instance of <Jx.Tab> to add to the tab set. More than one tab can be added by passing extra parameters to this method. |
remove: function( tab )
Remove a tab from this TabSet. Note that it is the caller’s responsibility to remove the tab from the Jx.Toolbar.
| tab | {<Jx.Tab>} the tab to remove. |
setActiveTab: function( tab )
Set the active tab to the one passed to this method
| tab | {Jx.Button.Tab} the tab to make active. |
Resize the tab set content area and propogate the changes to each of the tabs managed by the tab set.
resizeTabBox: function()
Add one or more Jx.Button.Tabs to the TabSet.
add: function()
Remove a tab from this TabSet.
remove: function( tab )
Set the active tab to the one passed to this method
setActiveTab: function( tab )