com.vaadin.client.ui
Class VTabsheet

java.lang.Object
  extended by ComplexPanel
      extended by com.vaadin.client.ui.VTabsheetBase
          extended by com.vaadin.client.ui.VTabsheet
All Implemented Interfaces:
Focusable, SubPartAware

public class VTabsheet
extends VTabsheetBase
implements Focusable, SubPartAware


Nested Class Summary
 class VTabsheet.PlaceHolder
          Deprecated. as of 7.1, VTabsheet only keeps the active tab in the DOM without any place holders.
static class VTabsheet.Tab
          Representation of a single "tab" shown in the TabBar
static class VTabsheet.TabCaption
           
 
Field Summary
static java.lang.String CLASSNAME
           
 Element contentNode
          For internal use only.
static java.lang.String SCROLLER_CLASSNAME
           
protected  VTabsheetPanel tabPanel
          For internal use only.
 Element tabs
          For internal use only.
static java.lang.String TABS_CLASSNAME
           
 boolean waitingForResponse
          For internal use only.
 
Fields inherited from class com.vaadin.client.ui.VTabsheetBase
activeTabIndex, client, connector, disabled, disabledTabKeys, readonly, tabKeys
 
Constructor Summary
VTabsheet()
           
 
Method Summary
 void blur()
           
protected  void clearPaintables()
          Clears current tabs and contents
 void focus()
          Sets focus to this widget.
 ApplicationConnection getApplicationConnection()
          Deprecated. since 7.2 - use more specific methods instead (getRpcProxy(), getConnectorForWidget(Widget) etc.)
protected  int getCloseTabKey()
           
 int getContentAreaBorderWidth()
          For internal use only.
 Widget getCurrentlyDisplayedWidget()
          Returns the currently displayed widget in the tab panel.
protected  int getNextTabKey()
           
protected  int getPreviousTabKey()
           
protected  com.vaadin.shared.ui.tabsheet.TabsheetServerRpc getRpcProxy()
          Returns the client to server RPC proxy for the tabsheet.
protected  int getSelectTabKey()
          Gets the key to activate the selected tab when navigating using previous/next (left/right) keys.
 com.google.gwt.user.client.Element getSubPartElement(java.lang.String subPart)
          Locates an element inside a component using the identifier provided in subPart.
 java.lang.String getSubPartName(com.google.gwt.user.client.Element subElement)
          Provides an identifier that identifies the element within the component.
 ComponentConnector getTab(int index)
          Implement in extending classes.
 int getTabCount()
          Implement in extending classes.
 java.util.Iterator<Widget> getWidgetIterator()
           
 void handleStyleNames(com.vaadin.shared.AbstractComponentState state)
          For internal use only.
 void hideTabs()
          Makes tab bar invisible.
 void iLayout()
          Run internal layouting.
 boolean loadTabSheet(int tabIndex)
          Load the content of a tab of the provided index.
 void onBrowserEvent(Event event)
           
 void removeTab(int index)
          Implement in extending classes.
 void renderContent(Widget newWidget)
          Renders the widget content for a tab sheet.
 void renderTab(com.vaadin.shared.ui.tabsheet.TabState tabState, int index)
          Implement in extending classes.
 void selectTab(int index)
          For internal use only.
 void setConnector(AbstractComponentConnector connector)
          Sets the connector that should be notified of events etc.
 void showAllTabs()
          For internal use only.
 void showTabs()
          Makes tab bar visible.
 void tabSizeMightHaveChanged(VTabsheet.Tab tab)
           
 void updateContentNodeHeight()
          For internal use only.
 void updateDynamicWidth()
          For internal use only.
 void updateOpenTabSize()
          Sets the size of the visible tab (component).
 
Methods inherited from class com.vaadin.client.ui.VTabsheetBase
addTabKey, clearTabKeys, getConnectorForWidget, isDynamicHeight, isDynamicWidth, isEnabled, isTabCaptionsAsHtml, setActiveTabIndex, setClient, setEnabled, setReadonly, setTabCaptionsAsHtml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASSNAME

public static final java.lang.String CLASSNAME
See Also:
Constant Field Values

TABS_CLASSNAME

public static final java.lang.String TABS_CLASSNAME
See Also:
Constant Field Values

SCROLLER_CLASSNAME

public static final java.lang.String SCROLLER_CLASSNAME
See Also:
Constant Field Values

tabs

public final Element tabs
For internal use only. May be removed or replaced in the future.


tabPanel

protected final VTabsheetPanel tabPanel
For internal use only. May be removed or replaced in the future.


contentNode

public final Element contentNode
For internal use only. May be removed or replaced in the future.


waitingForResponse

public boolean waitingForResponse
For internal use only. May be removed or replaced in the future.

Constructor Detail

VTabsheet

public VTabsheet()
Method Detail

loadTabSheet

public boolean loadTabSheet(int tabIndex)
Load the content of a tab of the provided index.

Parameters:
index - of the tab to load
Returns:
true if the specified sheet gets loaded, otherwise false.

getCurrentlyDisplayedWidget

public Widget getCurrentlyDisplayedWidget()
Returns the currently displayed widget in the tab panel.

Returns:
currently displayed content widget
Since:
7.2

getRpcProxy

protected com.vaadin.shared.ui.tabsheet.TabsheetServerRpc getRpcProxy()
Returns the client to server RPC proxy for the tabsheet.

Returns:
RPC proxy
Since:
7.2

getApplicationConnection

@Deprecated
public ApplicationConnection getApplicationConnection()
Deprecated. since 7.2 - use more specific methods instead (getRpcProxy(), getConnectorForWidget(Widget) etc.)

For internal use only. Avoid using this method directly and use appropriate superclass methods where applicable.

Returns:
ApplicationConnection

tabSizeMightHaveChanged

public void tabSizeMightHaveChanged(VTabsheet.Tab tab)

onBrowserEvent

public void onBrowserEvent(Event event)

handleStyleNames

public void handleStyleNames(com.vaadin.shared.AbstractComponentState state)
For internal use only. May be removed or replaced in the future.


updateDynamicWidth

public void updateDynamicWidth()
For internal use only. May be removed or replaced in the future.


renderTab

public void renderTab(com.vaadin.shared.ui.tabsheet.TabState tabState,
                      int index)
Description copied from class: VTabsheetBase
Implement in extending classes. This method should render needed elements and set the visibility of the tab according to the 'selected' parameter.

Specified by:
renderTab in class VTabsheetBase

renderContent

public void renderContent(Widget newWidget)
Renders the widget content for a tab sheet.

Parameters:
newWidget -

updateContentNodeHeight

public void updateContentNodeHeight()
For internal use only. May be removed or replaced in the future.


iLayout

public void iLayout()
Run internal layouting.


updateOpenTabSize

public void updateOpenTabSize()
Sets the size of the visible tab (component). As the tab is set to position: absolute (to work around a firefox flickering bug) we must keep this up-to-date by hand.

For internal use only. May be removed or replaced in the future.


showAllTabs

public void showAllTabs()
For internal use only. May be removed or replaced in the future.


clearPaintables

protected void clearPaintables()
Description copied from class: VTabsheetBase
Clears current tabs and contents

Specified by:
clearPaintables in class VTabsheetBase

getWidgetIterator

public java.util.Iterator<Widget> getWidgetIterator()
Specified by:
getWidgetIterator in class VTabsheetBase
Returns:
a list of currently shown Widgets

getContentAreaBorderWidth

public int getContentAreaBorderWidth()
For internal use only. May be removed or replaced in the future.


getTabCount

public int getTabCount()
Description copied from class: VTabsheetBase
Implement in extending classes. This method should return the number of tabs currently rendered.

Specified by:
getTabCount in class VTabsheetBase

getTab

public ComponentConnector getTab(int index)
Description copied from class: VTabsheetBase
Implement in extending classes. This method should return the Paintable corresponding to the given index.

Specified by:
getTab in class VTabsheetBase

removeTab

public void removeTab(int index)
Description copied from class: VTabsheetBase
Implement in extending classes. This method should remove the rendered tab with the specified index.

Specified by:
removeTab in class VTabsheetBase

selectTab

public void selectTab(int index)
Description copied from class: VTabsheetBase
For internal use only. May be removed or replaced in the future.

Specified by:
selectTab in class VTabsheetBase

focus

public void focus()
Description copied from interface: Focusable
Sets focus to this widget.

Specified by:
focus in interface Focusable

blur

public void blur()

setConnector

public void setConnector(AbstractComponentConnector connector)
Description copied from class: VTabsheetBase
Sets the connector that should be notified of events etc. For internal use only. This method may be removed or replaced in the future.

Overrides:
setConnector in class VTabsheetBase

getPreviousTabKey

protected int getPreviousTabKey()
Returns:
The key code of the keyboard shortcut that selects the previous tab in a focused tabsheet.

getSelectTabKey

protected int getSelectTabKey()
Gets the key to activate the selected tab when navigating using previous/next (left/right) keys.

Returns:
the key to activate the selected tab.
See Also:
getNextTabKey(), getPreviousTabKey()

getNextTabKey

protected int getNextTabKey()
Returns:
The key code of the keyboard shortcut that selects the next tab in a focused tabsheet.

getCloseTabKey

protected int getCloseTabKey()
Returns:
The key code of the keyboard shortcut that closes the currently selected tab in a focused tabsheet.

showTabs

public void showTabs()
Makes tab bar visible.

Since:
7.2

hideTabs

public void hideTabs()
Makes tab bar invisible.

Since:
7.2

getSubPartElement

public com.google.gwt.user.client.Element getSubPartElement(java.lang.String subPart)
Description copied from interface: SubPartAware
Locates an element inside a component using the identifier provided in subPart. The subPart identifier is component specific and may be any string of characters, numbers, space characters and brackets.

Specified by:
getSubPartElement in interface SubPartAware
Parameters:
subPart - The identifier for the element inside the component
Returns:
The element identified by subPart or null if the element could not be found.

getSubPartName

public java.lang.String getSubPartName(com.google.gwt.user.client.Element subElement)
Description copied from interface: SubPartAware
Provides an identifier that identifies the element within the component. The subElement is a part of the component and must never be null.

Note! getSubPartElement(getSubPartName(element)) == element is not always true. A component can choose to provide a more generic identifier for any given element if the results of all interactions with subElement are the same as interactions with the element identified by the return value. For example a button can return an identifier for the root element even though a DIV inside the button was passed as subElement because interactions with the DIV and the root button element produce the same result.

Specified by:
getSubPartName in interface SubPartAware
Parameters:
subElement - The element the identifier string should uniquely identify
Returns:
An identifier that uniquely identifies subElement or null if no identifier could be provided.


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.