gadgets.TabSet
Constructor
gadgets.TabSet
Creates a new TabSet object.
Parameter
Name |
Type |
Description |
---|---|---|
opt_moduleId |
String |
Module ID. |
opt_defaultTab |
String |
Default Tab name that is selected after it is generated. |
opt_container |
Element |
HTML container elements that include a Tab. |
Sample
Method
gadgets.TabSet.addTab
Adds a Tab.
Parameter
Name |
Type |
Description |
---|---|---|
tabName |
String |
Label for the Tab to be created. |
opt_params |
Object |
Parameter object. |
Return value
Type |
Description |
---|---|
String |
DOM ID for a Tab container. |
gadgets.TabSet.alignTabs
Sets the Tab layout. By default, tabs are centered.
Parameter
Name |
Type |
Description |
---|---|---|
align |
String |
Position of the Tabs. It is either "left", "center", or "right". |
opt_offset |
Number |
Parameter for setting the number of pixels that offsets the Tab from the left end or the right end. Default is 3px. |
Return value
None
Sample
gadgets.TabSet.displayTabs
Switches between show/hide for all of the Tabs and contents linked to the Tabs.
Parameter
Name |
Type |
Description |
---|---|---|
display |
Boolean |
The Tab is shown when it is "True". It is hidden when it is "False". |
Return value
None
Sample
gadgets.TabSet.getHeaderContainer
Returns the Tab header container element.
Parameter
None
Return value
Type |
Description |
---|---|
Element |
Tab header container element. |
Sample
gadgets.TabSet.getSelectedTab
Returns the Tab object that is currently selected.
Parameter
None
Return value
Type |
Description |
---|---|
gadgets.Tab |
Tab object that is currently selected. |
Sample
gadgets.TabSet.getTabs
Returns the array of all existing Tab objects.
Parameter
None
Return value
Type |
Description |
---|---|
Array.<gadgets.Tab> |
Array of all existing Tab objects. |
gadgets.TabSet.removeTab
Deletes Tabs in tabIndex and the contents that are linked to the Tabs.
Parameter
Name |
Type |
Description |
---|---|---|
tabIndex |
Number |
Index of the Tabs to be deleted. |
Return value
None
gadgets.TabSet.setSelectedTab
Selects the Tab in tabIndex and calls the Tab’s callback function, if there is one. If the Tab has already been selected, callback will not be called.
Parameter
Name |
Type |
Description |
---|---|---|
tabIndex |
Number |
Index of the Tab to be selected. |
Return value
None
Sample
gadgets.TabSet.swapTabs
Switches the positions of Tabs that are in tabIndex1 and tabIndex2. The selected Tabs are not modified, and the callback function is not called either.
Parameter
Name |
Type |
Description |
---|---|---|
tabIndex1 |
Number |
Index for the first Tab to be switched. |
tabIndex2 |
Number |
Index for the second Tab to be switched. |
Return value
None
Sample
Revision History
- 12/2010
- Initial Release.