Class SweetDevRia.TabLayout
Extends
RiaComponent, RiaComponent.
TabLayout
Defined in: TabLayout.js.
Constructor Attributes | Constructor Name and Description |
---|---|
<private> |
Tab Layout component class
|
Field Attributes | Field Name and Description |
---|---|
<static> |
SweetDevRia.TabLayout.ACTIVE_EVENT
This event type is fired when the window is closed
|
Method Attributes | Method Name and Description |
---|---|
activateBetterTab(tab)
Activates the better tab around the one given in parameter
|
|
Activates the tab on the right side of the one currently active
|
|
Activates the tab on the left side of the one currently active
|
|
activateTabId(tabId)
Activates a tab id for this tab layout
|
|
<private> |
addDynamicView(tab)
Adds a view for a dynamically created tab.
|
<private> |
addHeaderView(tab)
Adds a header view for a tab.
|
addTab(tab)
Adds a tab to this tab layout
|
|
afterActivateTab(tabId)
This method is called after a tab activation
To be overridden !!
|
|
beforeActivateTab(tabId)
This method is called before a tab activation
To be overridden !!
|
|
<private> |
buildAndRegisterTab(properties)
Build and registers a tab from server data
|
<private> |
createTabContent(properties)
Create a TabContent object from the properties coming from a Java object, as a JSON object
|
disable(tabId)
Disable a tab id
|
|
enable(tabId)
Enable a tab id
|
|
<private> |
endTabLoading(tab)
Called on a load complete, meaning the tab activation switching can finally occur.
|
getNextActivableTabId(tabId)
Return the next activable tab id, from the one given in parameter
|
|
getPreviousActivableTabId(tabId)
Return the previous activable tab id, from the one given in parameter
|
|
getTab(tabId)
Return the tab corresponding an id
|
|
getTabIdForIndex(index)
Get the tab id at a specific index
|
|
getTabIndexForId(tabId)
Get the index in the view of a tab
|
|
Return the total number of tabs of this layout, independently from the tab status
|
|
getVisibleTabIdForIndex(index)
Get the tab id at a specific index, disregard for invisible one.
|
|
Return the total number of visible tabs of this layout
|
|
isTabActivable(tab)
Return true if tab can be activated, false otherwise
|
|
<private> |
loadDivTab(tab)
Load an ajax tab as a div
|
<private> |
loadIframeTab(tab)
Load an ajax tab as an iframe
|
<private> |
loadTab(tab)
Load an ajax tab (either iframe of div)
|
<private> |
onTabHeaderClick(tabId)
Action triggered on tab header click : activation
|
<private> |
registerTab(tab)
Register a tab in this layout
|
<private> |
removeContentView(tab)
Remove a content view for a tab.
|
<private> |
removeHeaderView(tab)
Remove a header view for a tab.
|
removeTabId(tabId)
Removes a tab id from this tab layout
|
|
<private> |
Render the tabs headers.
|
<private> |
showHide(tabShowId, tabHideId)
Switch two tabs visibility
|
<private> |
toShortHeader(tab)
Set a shortest text content for a tab header if possible
|
<private> |
unregisterTab(tab)
Unregister a tab in this layout
|
Class Detail
<private>
SweetDevRia.TabLayout(id)
Tab Layout component class
- Parameters:
- {String} id
- The id of the tab layout
Field Detail
<static>
SweetDevRia.TabLayout.ACTIVE_EVENT
This event type is fired when the window is closed
Method Detail
activateBetterTab(tab)
Activates the better tab around the one given in parameter
- Parameters:
- {TabContent} tab
- the tab active currently
activateNextTab()
Activates the tab on the right side of the one currently active
activatePreviousTab()
Activates the tab on the left side of the one currently active
activateTabId(tabId)
Activates a tab id for this tab layout
- Parameters:
- {String} tabId
- the tab id to activate
<private>
addDynamicView(tab)
Adds a view for a dynamically created tab.
- Parameters:
- {TabContent} tab
- the tab to add
<private>
addHeaderView(tab)
Adds a header view for a tab.
- Parameters:
- {TabContent} tab
- the tab to add the header for.
- Throws:
- TooMuchTabs Tab width is greater than layout width
addTab(tab)
Adds a tab to this tab layout
- Parameters:
- {TabContent} tab
- the tab content, previsouly created to add
afterActivateTab(tabId)
This method is called after a tab activation
To be overridden !!
- Parameters:
- {String} tabId
- tab identifiant
beforeActivateTab(tabId)
This method is called before a tab activation
To be overridden !!
- Parameters:
- {String} tabId
- tab identifiant
<private>
buildAndRegisterTab(properties)
Build and registers a tab from server data
- Parameters:
- {Map} properties
- the properties loaded by JSON from the server
<private>
{TabContent}
createTabContent(properties)
Create a TabContent object from the properties coming from a Java object, as a JSON object
- Parameters:
- {Map} properties
- the properties loaded by JSON from the server
- Returns:
- the tab created
disable(tabId)
Disable a tab id
- Parameters:
- {String} tabId
- the tab id to disable
enable(tabId)
Enable a tab id
- Parameters:
- {String} tabId
- the tab id to enable
<private>
endTabLoading(tab)
Called on a load complete, meaning the tab activation switching can finally occur.
- Parameters:
- {TabContent} tab
- the tab finally loaded
{String}
getNextActivableTabId(tabId)
Return the next activable tab id, from the one given in parameter
- Parameters:
- {String} tabId
- the tab id which the research start from
- Returns:
- the next activable tab id
{String}
getPreviousActivableTabId(tabId)
Return the previous activable tab id, from the one given in parameter
- Parameters:
- {String} tabId
- the tab id which the research start from
- Returns:
- the previous activable tab id
{TabContent}
getTab(tabId)
Return the tab corresponding an id
- Parameters:
- {String} tabId
- the tab id to get
- Returns:
- the tab corresponding to this id
{String}
getTabIdForIndex(index)
Get the tab id at a specific index
- Parameters:
- {int} index
- the index to search
- Returns:
- the tab id at a specific index
{int}
getTabIndexForId(tabId)
Get the index in the view of a tab
- Parameters:
- {String} tabId
- the tab id to return the index
- Returns:
- the tab index in the view
{int}
getTabNumber()
Return the total number of tabs of this layout, independently from the tab status
- Returns:
- the total number of tabs of this layout
{String}
getVisibleTabIdForIndex(index)
Get the tab id at a specific index, disregard for invisible one.
- Parameters:
- {int} index
- the index to search
- Returns:
- the tab id at a specific index
{int}
getVisibleTabNumber()
Return the total number of visible tabs of this layout
- Returns:
- the total number of visible tabs of this layout
{boolean}
isTabActivable(tab)
Return true if tab can be activated, false otherwise
- Parameters:
- {TabContent} tab
- the tab content that may be activable
- Returns:
- true if tab can be activated, false otherwise
<private>
loadDivTab(tab)
Load an ajax tab as a div
- Parameters:
- {TabContent} tab
- the tab to load
<private>
loadIframeTab(tab)
Load an ajax tab as an iframe
- Parameters:
- {TabContent} tab
- the tab to load
<private>
loadTab(tab)
Load an ajax tab (either iframe of div)
- Parameters:
- {TabContent} tab
- the tab to load
<private>
onTabHeaderClick(tabId)
Action triggered on tab header click : activation
- Parameters:
- {String} tabId
- the tab id clicked
<private>
registerTab(tab)
Register a tab in this layout
- Parameters:
- {TabContent} tab
- the tab to register
<private>
removeContentView(tab)
Remove a content view for a tab.
- Parameters:
- {TabContent} tab
- the tab to remove the content for.
<private>
removeHeaderView(tab)
Remove a header view for a tab.
- Parameters:
- {TabContent} tab
- the tab to remove the header for.
removeTabId(tabId)
Removes a tab id from this tab layout
- Parameters:
- {String} tabId
- the tab id to remove
<private>
renderHeaders()
Render the tabs headers. Called on startup
<private>
showHide(tabShowId, tabHideId)
Switch two tabs visibility
- Parameters:
- {String} tabShowId
- the tab to show
- {String} tabHideId
- the tab to hide
<private>
toShortHeader(tab)
Set a shortest text content for a tab header if possible
- Parameters:
- {TabContent} tab
- the tab content to change
<private>
unregisterTab(tab)
Unregister a tab in this layout
- Parameters:
- {TabContent} tab
- the tab to unregister