com.vaadin.addon.touchkit.ui
Class TabBarView

java.lang.Object
  extended by com.vaadin.server.AbstractClientConnector
      extended by com.vaadin.ui.AbstractComponent
          extended by com.vaadin.ui.AbstractComponentContainer
              extended by com.vaadin.addon.touchkit.ui.TabBarView
All Implemented Interfaces:
com.vaadin.event.MethodEventSource, com.vaadin.server.ClientConnector, com.vaadin.server.Sizeable, com.vaadin.shared.Connector, com.vaadin.ui.Component, com.vaadin.ui.ComponentContainer, com.vaadin.ui.HasComponents, com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, Serializable, Iterable<com.vaadin.ui.Component>

public class TabBarView
extends com.vaadin.ui.AbstractComponentContainer

The TabBarView is a tabsheet implementation that mimics the native tabsheet (TabBarView) in iOS. By default a bar with equally sized tab buttons is shown below the tab content.

See Also:
Serialized Form

Nested Class Summary
static class TabBarView.SelectedTabChangeEvent
          Selected tab change event.
static interface TabBarView.SelectedTabChangeListener
          Selected tab change event listener.
 
Nested classes/interfaces inherited from interface com.vaadin.ui.HasComponents
com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.HasComponents.ComponentAttachEvent, com.vaadin.ui.HasComponents.ComponentAttachListener, com.vaadin.ui.HasComponents.ComponentDetachEvent, com.vaadin.ui.HasComponents.ComponentDetachListener
 
Nested classes/interfaces inherited from interface com.vaadin.ui.Component
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener
 
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector
com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener
 
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable
com.vaadin.server.Sizeable.Unit
 
Field Summary
 
Fields inherited from interface com.vaadin.server.Sizeable
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
 
Constructor Summary
TabBarView()
          Constructs a TabBarView that is 100% wide and high.
 
Method Summary
 void addComponent(com.vaadin.ui.Component c)
          Deprecated. The behavior differs from regular ComponentContainer s, use the specialized API instead: addTab(Component) and removeTab(Component)
 void addListener(TabBarView.SelectedTabChangeListener listener)
          Adds a tab selection listener
 com.vaadin.ui.TabSheet.Tab addTab(com.vaadin.ui.Component tabContent)
          Adds a new sheet to the TabBarView, and adds a button representing it to the tab bar.
 com.vaadin.ui.TabSheet.Tab addTab(com.vaadin.ui.Component tabContent, String caption)
          Adds a new sheet to the TabBarView, and adds a button representing it to the tab bar.
 com.vaadin.ui.TabSheet.Tab addTab(com.vaadin.ui.Component tabContent, String caption, com.vaadin.server.Resource icon)
          Adds a new sheet to the TabBarView, and adds a button representing it to the tab bar.
protected  void fireSelectedTabChange()
          Sends an event that the currently selected tab has changed.
 int getComponentCount()
           
 Iterator<com.vaadin.ui.Component> getComponentIterator()
          Otherwise as ComponentContainer.getComponentIterator(), but note that a tab is not in the component hierarchy before it is activated, even tough it has been added with addTab(Component).
 com.vaadin.ui.TabSheet.Tab getSelelectedTab()
           
 Iterator<com.vaadin.ui.Component> iterator()
           
 void removeComponent(com.vaadin.ui.Component c)
          Deprecated. The behavior differs from regular ComponentContainer s, use the specialized API instead: addTab(Component) and removeTab(Component)
 void removeListener(TabBarView.SelectedTabChangeListener listener)
          Removes a tab selection listener
 void removeTab(com.vaadin.ui.Component c)
          Removes the given tab content and the tab button associated with it.
 void removeTab(com.vaadin.ui.TabSheet.Tab tab)
          Removes the given tab (content and tab-bar button) from the TabBarView
 void replaceComponent(com.vaadin.ui.Component oldComponent, com.vaadin.ui.Component newComponent)
          Deprecated. The behavior differs from regular ComponentContainer s, use the specialized API instead: addTab(Component) and removeTab(Component)
 void setSelectedTab(com.vaadin.ui.Component tab)
          Sets the active tab, i.e.
 void setSelectedTab(com.vaadin.ui.TabSheet.Tab tab)
          Sets the active TabSheet.Tab, i.e.
 
Methods inherited from class com.vaadin.ui.AbstractComponentContainer
addComponentAttachListener, addComponentDetachListener, addComponents, addListener, addListener, fireComponentAttachEvent, fireComponentDetachEvent, moveComponentsFrom, removeAllComponents, removeComponentAttachListener, removeComponentDetachListener, removeListener, removeListener, setHeight, setWidth
 
Methods inherited from class com.vaadin.ui.AbstractComponent
addListener, addShortcutListener, addStyleName, attach, beforeClientResponse, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, focus, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getState, getState, getStyleName, getWidth, getWidthUnits, isConnectorEnabled, isEnabled, isImmediate, isReadOnly, isVisible, removeListener, removeShortcutListener, removeStyleName, setCaption, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setIcon, setId, setImmediate, setLocale, setParent, setPrimaryStyleName, setReadOnly, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth
 
Methods inherited from class com.vaadin.server.AbstractClientConnector
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hasListeners, isAttached, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.vaadin.ui.Component
addListener, addStyleName, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setReadOnly, setStyleName, setVisible
 
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
 
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
 
Methods inherited from interface com.vaadin.server.Sizeable
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setSizeFull, setSizeUndefined, setWidth
 

Constructor Detail

TabBarView

public TabBarView()
Constructs a TabBarView that is 100% wide and high.

Method Detail

addTab

public com.vaadin.ui.TabSheet.Tab addTab(com.vaadin.ui.Component tabContent)
Adds a new sheet to the TabBarView, and adds a button representing it to the tab bar. The button gets it's caption and icon from the content.

Parameters:
tabContent - the sheet content
Returns:
tab 'meta-data' that can be used to configure the tab further
See Also:
TabSheet.Tab

addTab

public com.vaadin.ui.TabSheet.Tab addTab(com.vaadin.ui.Component tabContent,
                                         String caption)
Adds a new sheet to the TabBarView, and adds a button representing it to the tab bar. The button gets the given caption and no icon.

Parameters:
tabContent - the sheet content
caption - the caption to be used in the tab bar button
Returns:
tab 'meta-data' that can be used to configure the tab further
See Also:
TabSheet.Tab

addTab

public com.vaadin.ui.TabSheet.Tab addTab(com.vaadin.ui.Component tabContent,
                                         String caption,
                                         com.vaadin.server.Resource icon)
Adds a new sheet to the TabBarView, and adds a button representing it to the tab bar. The button gets the given caption and icon.

Parameters:
tabContent - the sheet content
caption - the caption to be used in the tab bar button
icon - the icon to be used in the tab bar button
Returns:
tab 'meta-data' that can be used to configure the tab further
See Also:
TabSheet.Tab

addComponent

@Deprecated
public void addComponent(com.vaadin.ui.Component c)
Deprecated. The behavior differs from regular ComponentContainer s, use the specialized API instead: addTab(Component) and removeTab(Component)

Specified by:
addComponent in interface com.vaadin.ui.ComponentContainer
Overrides:
addComponent in class com.vaadin.ui.AbstractComponentContainer
Throws:
UnsupportedOperationException

removeTab

public void removeTab(com.vaadin.ui.Component c)
Removes the given tab content and the tab button associated with it.

Parameters:
c - the tab content to remove

removeComponent

@Deprecated
public void removeComponent(com.vaadin.ui.Component c)
Deprecated. The behavior differs from regular ComponentContainer s, use the specialized API instead: addTab(Component) and removeTab(Component)

Specified by:
removeComponent in interface com.vaadin.ui.ComponentContainer
Overrides:
removeComponent in class com.vaadin.ui.AbstractComponentContainer
Throws:
UnsupportedOperationException

removeTab

public void removeTab(com.vaadin.ui.TabSheet.Tab tab)
Removes the given tab (content and tab-bar button) from the TabBarView

Parameters:
tab - the tab to remove

setSelectedTab

public void setSelectedTab(com.vaadin.ui.Component tab)
Sets the active tab, i.e. sets the content as currently visible and marks its button in the tab-bar as active.

Parameters:
tab - the content to show

setSelectedTab

public void setSelectedTab(com.vaadin.ui.TabSheet.Tab tab)
Sets the active TabSheet.Tab, i.e. sets the tab content as currently visible and marks its button in the tab-bar as active.

Parameters:
tab - the TabSheet.Tab to show

getSelelectedTab

public com.vaadin.ui.TabSheet.Tab getSelelectedTab()
Returns:
the currently selected Tab

replaceComponent

@Deprecated
public void replaceComponent(com.vaadin.ui.Component oldComponent,
                                        com.vaadin.ui.Component newComponent)
Deprecated. The behavior differs from regular ComponentContainer s, use the specialized API instead: addTab(Component) and removeTab(Component)

Throws:
UnsupportedOperationException

getComponentIterator

public Iterator<com.vaadin.ui.Component> getComponentIterator()
Otherwise as ComponentContainer.getComponentIterator(), but note that a tab is not in the component hierarchy before it is activated, even tough it has been added with addTab(Component).

Specified by:
getComponentIterator in interface com.vaadin.ui.ComponentContainer
Overrides:
getComponentIterator in class com.vaadin.ui.AbstractComponentContainer
See Also:
ComponentContainer.getComponentIterator()

addListener

public void addListener(TabBarView.SelectedTabChangeListener listener)
Adds a tab selection listener

Parameters:
listener - the Listener to be added.

removeListener

public void removeListener(TabBarView.SelectedTabChangeListener listener)
Removes a tab selection listener

Parameters:
listener - the Listener to be removed.

fireSelectedTabChange

protected void fireSelectedTabChange()
Sends an event that the currently selected tab has changed.


getComponentCount

public int getComponentCount()

iterator

public Iterator<com.vaadin.ui.Component> iterator()


Copyright © 2014 Vaadin Ltd. All rights reserved.