org.cruxframework.crux.plugin.gadget.client.features
Class Tabs

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by org.cruxframework.crux.plugin.gadget.client.features.Tabs

public class Tabs
extends com.google.gwt.core.client.JavaScriptObject

Represents a TabSet open social API

Author:
Thiago da Rosa de Bustamante

Nested Class Summary
static class Tabs.Align
           
 
Constructor Summary
protected Tabs()
           
 
Method Summary
 String addTab(String tabName)
          Add a new tab into the tabSet
 String addTab(String tabName, int index)
          Add a new tab into the tabSet
 String addTab(String tabName, int index, String tooltip)
          Add a new tab into the tabSet
 String addTab(String tabName, int index, String tooltip, TabsFeature.Callback callback)
          Add a new tab into the tabSet
 String addTab(String tabName, int index, String tooltip, TabsFeature.Callback callback, com.google.gwt.user.client.Element contentContainer)
          Add a new tab into the tabSet
 void alignTabs(String align, String offset)
          Sets the alignment of tabs
 void alignTabs(Tabs.Align align)
          Sets the alignment of tabs
 void alignTabs(Tabs.Align align, String offset)
          Sets the alignment of tabs
 void displayTabs(boolean display)
          Hide or show the tabs
 com.google.gwt.user.client.Element getHeaderContainer()
          Returns the tab headers container element.
 Tab getSelectedTab()
          Returns the currently selected tab object.
 com.google.gwt.core.client.JsArray<Tab> getTabs()
          Returns an array of all existing tab objects.
 void removeTab(int index)
          Removes a tab at tabIndex and all of its associated content.
 void setSelectedTab(int index)
          Selects the tab at tabIndex and fires the tab's callback function if it exists.
 void swapTabs(int index1, int index2)
          Swaps the positions of tabs at tabIndex1 and tabIndex2.
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Tabs

protected Tabs()
Method Detail

addTab

public final String addTab(String tabName)
Add a new tab into the tabSet

Parameters:
tabName -
Returns:

addTab

public final String addTab(String tabName,
                           int index)
Add a new tab into the tabSet

Parameters:
tabName -
index -
Returns:

addTab

public final String addTab(String tabName,
                           int index,
                           String tooltip)
Add a new tab into the tabSet

Parameters:
tabName -
index -
tooltip -
Returns:

addTab

public final String addTab(String tabName,
                           int index,
                           String tooltip,
                           TabsFeature.Callback callback)
Add a new tab into the tabSet

Parameters:
tabName -
index -
tooltip -
callback -
Returns:

addTab

public final String addTab(String tabName,
                           int index,
                           String tooltip,
                           TabsFeature.Callback callback,
                           com.google.gwt.user.client.Element contentContainer)
Add a new tab into the tabSet

Parameters:
tabName -
index -
tooltip -
callback -
contentContainer -
Returns:

alignTabs

public final void alignTabs(Tabs.Align align)
Sets the alignment of tabs

Parameters:
align -

alignTabs

public final void alignTabs(Tabs.Align align,
                            String offset)
Sets the alignment of tabs

Parameters:
align -
offset -

alignTabs

public final void alignTabs(String align,
                            String offset)
Sets the alignment of tabs

Parameters:
align -
offset -

displayTabs

public final void displayTabs(boolean display)
Hide or show the tabs

Parameters:
display -

getHeaderContainer

public final com.google.gwt.user.client.Element getHeaderContainer()
Returns the tab headers container element.

Returns:

getSelectedTab

public final Tab getSelectedTab()
Returns the currently selected tab object.

Returns:

getTabs

public final com.google.gwt.core.client.JsArray<Tab> getTabs()
Returns an array of all existing tab objects.

Returns:

removeTab

public final void removeTab(int index)
Removes a tab at tabIndex and all of its associated content.

Parameters:
index -

setSelectedTab

public final void setSelectedTab(int index)
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.

Parameters:
index -

swapTabs

public final void swapTabs(int index1,
                           int index2)
Swaps the positions of tabs at tabIndex1 and tabIndex2. The selected tab does not change, and no callback functions are called.

Parameters:
index1 -
index2 -


Copyright © 2014. All rights reserved.