com.sap.ui.commons.client
Class TabStripWidget

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.sap.ui.core.client.ControlWidget
              extended by com.sap.ui.commons.client.TabStripWidget
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.IsWidget

public class TabStripWidget
extends com.sap.ui.core.client.ControlWidget

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 AG)

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
  TabStripWidget()
          constructs the class TabStripWidget
  TabStripWidget(String id)
          constructs the class TabStripWidget
protected TabStripWidget(TabStrip control)
          constructs the class TabStripWidget
 
Method Summary
 void addTab(Tab tab)
          Appends some tab to the tabs-aggregation.
 void attachCloseEvent(com.sap.ui.core.client.event.EventListener listener)
          attach an EventListener Event is fired when the user closes a tab.
 void 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.
 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.
 void destroyTabs()
          Destroys all the tabs in the Tabs-aggregation.
 void detachCloseEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener Event is fired when the user closes a tab.
 void detachSelectEvent(com.sap.ui.core.client.event.EventListener listener)
          detach an EventListener Event is fired when the user selects a tab.
 TabStrip getControl()
          returns the reference to the Phoenix Control
 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.
 void insertTab(Tab tab, int index)
          Inserts some tab into the aggregation named tabs.
 void removeAllTabs()
          Removes all the items in the tabs-aggregation.
 void removeTab(int index)
          Removes the tab at position index in the tabs-aggregation named.
 void setHeight(String value)
          Setter for property height
 void setSelectedIndex(int value)
          Setter for property selectedIndex
Default value is: 0
 void setWidth(String value)
          Setter for property width
 
Methods inherited from class com.sap.ui.core.client.ControlWidget
destroy, doAttachChildren, doDetachChildren, isDesignTime, wrap
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TabStripWidget

public TabStripWidget()
constructs the class TabStripWidget


TabStripWidget

public TabStripWidget(String id)
constructs the class TabStripWidget

Parameters:
id - id of the TabStripWidget

TabStripWidget

protected TabStripWidget(TabStrip control)
constructs the class TabStripWidget

Parameters:
control - reference to an existing TabStrip
Method Detail

getControl

public TabStrip getControl()
returns the reference to the Phoenix Control

Overrides:
getControl in class com.sap.ui.core.client.ControlWidget
Returns:
reference to the Phoenix Control

getHeight

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

Returns:
the value of property height

setHeight

public void setHeight(String value)
Setter for property height

Overrides:
setHeight in class com.google.gwt.user.client.ui.UIObject
Parameters:
value - String

getWidth

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

Returns:
the value of property width

setWidth

public void setWidth(String value)
Setter for property width

Overrides:
setWidth in class com.google.gwt.user.client.ui.UIObject
Parameters:
value - String

getSelectedIndex

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

Returns:
the value of property selectedIndex

setSelectedIndex

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

Parameters:
value - int

getTabs

public 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 void 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.

addTab

public void addTab(Tab tab)
Appends some tab to the tabs-aggregation.

Parameters:
tab - com.sap.ui.commons.client.Tab the tab to add

removeTab

public void removeTab(int index)
Removes the tab at position index in the tabs-aggregation named.

Parameters:
index - int the position of the tab to remove.

removeAllTabs

public void removeAllTabs()
Removes all the items in the tabs-aggregation.


indexOfTab

public 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 void destroyTabs()
Destroys all the tabs in the Tabs-aggregation.


attachSelectEvent

public void 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

detachSelectEvent

public void 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

attachCloseEvent

public void 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

detachCloseEvent

public void 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

createTab

public 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 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.