Gadgets.TabSet (v0.9)

From VZ Developer Wiki
Revision as of 12:39, 29 July 2010 by Seba (talk | contribs) (Created page with '{{NeedsExamples}} <div style="float:right; margin: 0 0 10px 10px;">__TOC__</div> <span style="font-size:150%"><strong>gadgets.TabSet</strong></span> A class gadgets can use to …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This documentation is not completed yet and will be extended by more examples in future.

gadgets.TabSet

A class gadgets can use to make tabs.

Methods

gadgets.TabSet.addTab

String addTab(tabName, opt_params)
Parameters
Name Type Description
tabName String Label of the tab to create
opt_params Object Optional parameter object
Returns
Type Description
String DOM id of the tab container
Description
Adds a new tab based on the name-value pairs specified in opt_params. The following properties are supported in opt_params: <list style="hanging"> <t hangText="contentContainer">An existing HTML element to be used as the tab content container. If omitted, the tabs library creates one.</p> <t hangText="callback">A callback function to be executed when the tab is selected. The callback function will not be called until after the existing callstack has completed execution.</p> <t hangText="tooltip">A tooltip description that pops up when user moves the mouse cursor over the tab.</p> <t hangText="index">The index at which to insert the tab. If omitted, the new tab is appended to the end.</p> </list>

gadgets.TabSet.alignTabs

alignTabs(align, opt_offset)
Parameters
Name Type Description
align String 'left', 'center', or 'right'
opt_offset Number Optional parameter to set the number of pixels to offset tabs from the left or right edge; the default value is 3px
Description
Sets the alignment of tabs. Tabs are center-aligned by default.

gadgets.TabSet.displayTabs

displayTabs(display)
Parameters
Name Type Description
display Boolean True to show tabs; false to hide tabs
Description
Shows or hides tabs and all associated content.

gadgets.TabSet.getHeaderContainer

HTMLElement getHeaderContainer()
Returns
Type Description
HTMLElement The tab headers container element
Description
Returns the tab headers container element.

gadgets.TabSet.getSelectedTab

gadgets.Tab getSelectedTab()
Returns
Type Description
gadgets.Tab The currently selected tab object
Description
Returns the currently selected tab object.

gadgets.TabSet.getTabs

Array.<gadgets.Tab> getTabs()
Returns
Type Description
Array.<gadgets.Tab> Array of all existing tab objects
Description
Returns an array of all existing tab objects.

gadgets.TabSet.removeTab

removeTab(tabIndex)
Parameters
Name Type Description
tabIndex Number Index of the tab to remove
Description
Removes a tab at tabIndex and all of its associated content.

gadgets.TabSet.setSelectedTab

setSelectedTab(tabIndex)
Parameters
Name Type Description
tabIndex Number Index of the tab to select
Description
Selects the tab at tabIndex and fires the tab's callback function if it exists. If the tab is already selected, the callback is not fired.

gadgets.TabSet.swapTabs

swapTabs(tabIndex1, tabIndex2)
Parameters
Name Type Description
tabIndex1 Number Index of the first tab to swap
tabIndex2 Number Index of the secnod tab to swap
Description
Swaps the positions of tabs at tabIndex1 and tabIndex2. The selected tab does not change, and no callback functions are called.



OpenSocial (v0.9)

gadgets

gadgets.io

gadgets.json

gadgets.Prefs

gadgets.util

gadgets.views

gadgets.flash

gadgets.MiniMessage

gadgets.oauth.Popup

gadgets.rpc

gadgets.skins

gadgets.pubsub

gadgets.Tab

gadgets.TabSet

gadgets.window

gadgets.i18n

opensocial

opensocial.Activity

opensocial.Address

opensocial.Album

opensocial.BodyType

opensocial.Collection

opensocial.CreateActivityPriority

opensocial.DataRequest

opensocial.DataResponse

opensocial.Email

opensocial.Enum

opensocial.Environment

opensocial.EscapeType

opensocial.IdSpec

opensocial.MediaItem

opensocial.Message

opensocial.MessageCollection

opensocial.Name

opensocial.NavigationParameters

opensocial.Organization

opensocial.Permission

opensocial.Person

opensocial.Phone

opensocial.ResponseItem

opensocial.Url

osapi.Request

osapi.BatchRequest

osapi.people

osapi.activities

osapi.appdata

osapi.messages

osapi.http