com.sap.ui.commons.client
Class TabStrip

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.sap.ui.core.client.Element
          extended by com.sap.ui.core.client.Control
              extended by com.sap.ui.commons.client.TabStrip

public class TabStrip
extends com.sap.ui.core.client.Control

The class TabStrip is the GWT wrapper for the Phoenix control: sap.ui.commons.TabStrip.

A container for tab controls which contain the content and generally other controls. The user switches between the tabs then to display the content.

Version:
0.18.0-SNAPSHOT
Author:
GENERATOR (JavaScript control: sap.ui.commons.TabStrip)

Constructor Summary
protected TabStrip()
          constructs the class TabStrip
hidden due to JavaScriptObject restriction
 
Method Summary
 TabStrip addTab(Tab tab)
          Appends a tab to the aggregation tabs.
 TabStrip attachCloseEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener Event is fired when the user closes a tab.
 TabStrip attachSelectEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener Event is fired when the user selects a tab.
 void closeTab(int index)
          This method closes a atb.
static TabStrip create()
          creates a new instance of the class TabStrip
static TabStrip create(String idOrConfig)
          creates a new instance of the class TabStrip
static TabStrip create(String id, String config)
          creates a new instance of the class TabStrip
 void createTab(String text, com.sap.ui.core.client.Control content)
          Convenient method to add a tab with a text as title and a root control as content.
 TabStrip destroyTabs()
          Destroys all the tabs in the Tabs-aggregation.
 TabStrip detachCloseEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener Event is fired when the user closes a tab.
 TabStrip detachSelectEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener Event is fired when the user selects a tab.
 String getHeight()
          Getter for property height Height includes tab bar and content area.
 int getSelectedIndex()
          Getter for property selectedIndex Index of the currently selected tab.
 com.sap.ui.core.client.js.JsArray<Tab> getTabs()
          Getter for aggregation tabs Aggregating tabs contained in the tab strip.
 String getWidth()
          Getter for property width Width includes tab bar and content area.
 int indexOfTab(Tab tab)
          Checks for the provided com.sap.ui.commons.client.Tab in the tabs-aggregation and returns its index if found or -1 otherwise.
 TabStrip insertTab(Tab tab, int index)
          Inserts some tab into the aggregation named tabs.
 com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.js.JsArray<Tab>> removeAllTabs()
          Removes all the items in the tabs-aggregation.
 com.sap.ui.core.client.js.JsArray<Tab> removeTab(int index)
          Removes a tab from the aggregation named tabs.
 TabStrip setHeight(String value)
          Setter for property height
 TabStrip setSelectedIndex(int value)
          Setter for property selectedIndex
Default value is: 0
 TabStrip setWidth(String value)
          Setter for property width
 
Methods inherited from class com.sap.ui.core.client.Control
addStyleClass, hasStyleClass, invalidate, placeAt, placeAt, removeStyleClass, rerender
 
Methods inherited from class com.sap.ui.core.client.Element
_convertArray, _convertArray, _convertArray, _convertArray, _convertArray, attachBrowserEvent, attachEvent, bindAggregation, bindContext, bindProperty, bindProperty, destroy, detachBrowserEvent, detachEvent, getDomRef, getElementName, getId, getLibraryName, getModel, getParent, getProperty, getTooltip_AsString, getTooltip_Text, getTooltip, isActive, setModel, setProperty, setTooltip, setTooltip, unbindAggregation, unbindContext, unbindProperty
 
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

TabStrip

protected TabStrip()
constructs the class TabStrip
hidden due to JavaScriptObject restriction

Method Detail

create

public static TabStrip create()
creates a new instance of the class TabStrip


create

public static TabStrip create(String idOrConfig)
creates a new instance of the class TabStrip

Parameters:
id - id of the TabStrip or configuration JSON string

create

public static TabStrip create(String id,
                              String config)
creates a new instance of the class TabStrip

Parameters:
id - id of the TabStrip
config - configuration JSON string

getHeight

public final String getHeight()
Getter for property height Height includes tab bar and content area.

Returns:
the value of property height

setHeight

public final TabStrip setHeight(String value)
Setter for property height

Parameters:
value - String
Returns:
this to allow method chaining

getWidth

public final String getWidth()
Getter for property width Width includes tab bar and content area.

Returns:
the value of property width

setWidth

public final TabStrip setWidth(String value)
Setter for property width

Parameters:
value - String
Returns:
this to allow method chaining

getSelectedIndex

public final int getSelectedIndex()
Getter for property selectedIndex Index of the currently selected tab.

Returns:
the value of property selectedIndex

setSelectedIndex

public final TabStrip setSelectedIndex(int value)
Setter for property selectedIndex
Default value is: 0

Parameters:
value - int
Returns:
this to allow method chaining

getTabs

public final com.sap.ui.core.client.js.JsArray<Tab> getTabs()
Getter for aggregation tabs Aggregating tabs contained in the tab strip.

Returns:
com.sap.ui.commons.client.Tab[]

insertTab

public final TabStrip insertTab(Tab tab,
                                int index)
Inserts some tab into the aggregation named tabs.

Parameters:
tab - the tab to insert
index - int the 0-based index the tab should be inserted at.
Returns:
this to allow method chaining

addTab

public final TabStrip addTab(Tab tab)
Appends a tab to the aggregation tabs.

Parameters:
tab - com.sap.ui.commons.client.Tab the tab to add
Returns:
this to allow method chaining

removeTab

public final com.sap.ui.core.client.js.JsArray<Tab> removeTab(int index)
Removes a tab from the aggregation named tabs.

Parameters:
index - int the position of the tab to remove.
Returns:
reference to this instance

removeAllTabs

public final com.sap.ui.core.client.js.JsArray<com.sap.ui.core.client.js.JsArray<Tab>> removeAllTabs()
Removes all the items in the tabs-aggregation.

Returns:
an array of the removed elements (might be empty)

indexOfTab

public final int indexOfTab(Tab tab)
Checks for the provided com.sap.ui.commons.client.Tab in the tabs-aggregation and returns its index if found or -1 otherwise.

Parameters:
tab - the tab whose index is looked for.
Returns:
the index of the provided control in the aggregation.

destroyTabs

public final TabStrip destroyTabs()
Destroys all the tabs in the Tabs-aggregation.

Returns:
this to allow method chaining

attachSelectEvent

public final TabStrip attachSelectEvent(com.sap.ui.core.client.event.EventListener listener)
attach an EventListener Event is fired when the user selects a tab.
Event Parameters:
{int} index Index of the selected tab.

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining

detachSelectEvent

public final TabStrip detachSelectEvent(com.sap.ui.core.client.event.EventListener listener)
detach an EventListener Event is fired when the user selects a tab.

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining

attachCloseEvent

public final TabStrip attachCloseEvent(com.sap.ui.core.client.event.EventListener listener)
attach an EventListener Event is fired when the user closes a tab.
Event Parameters:
{int} index Index of the closed tab.

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining

detachCloseEvent

public final TabStrip detachCloseEvent(com.sap.ui.core.client.event.EventListener listener)
detach an EventListener Event is fired when the user closes a tab.

Parameters:
listener - reference to the EventListener
Returns:
this to allow method chaining

createTab

public final void createTab(String text,
                            com.sap.ui.core.client.Control content)
Convenient method to add a tab with a text as title and a root control as content.

Parameters:
text - Defines the title text of the newly created tab.
content - Defines the root control of the content area.

closeTab

public final void closeTab(int index)
This method closes a atb. If the tab is selecte thenext one will be selected. (If it's the last the previous one will be selected,) This method should be called if the close event is fired. It can not be called automatically because the consumer might need to run some logic before the tab is closed.

Parameters:
index - Index of the tab that should be closed.


Copyright © 2011 SAP. All Rights Reserved.