Package com.vaadin.client.ui
Class VTabsheet
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Panel
-
- com.google.gwt.user.client.ui.ComplexPanel
-
- com.vaadin.client.ui.VTabsheetBase
-
- com.vaadin.client.ui.VTabsheet
-
- 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.HasEnabled,com.google.gwt.user.client.ui.HasVisibility,com.google.gwt.user.client.ui.HasWidgets,com.google.gwt.user.client.ui.HasWidgets.ForIsWidget,com.google.gwt.user.client.ui.IndexedPanel,com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget,com.google.gwt.user.client.ui.IsWidget,Focusable,SubPartAware,Iterable<com.google.gwt.user.client.ui.Widget>
public class VTabsheet extends VTabsheetBase implements Focusable, SubPartAware
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classVTabsheet.PlaceHolderDeprecated.as of 7.1, VTabsheet only keeps the active tab in the DOM without any place holders.static classVTabsheet.TabRepresentation of a single "tab" shown in the TabBarstatic classVTabsheet.TabCaption-
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 Modifier and Type Field Description static StringCLASSNAMEcom.google.gwt.dom.client.ElementcontentNodeFor internal use only.static StringSCROLLER_CLASSNAMEprotected VTabsheetPaneltabPanelFor internal use only.com.google.gwt.dom.client.ElementtabsFor internal use only.static StringTABS_CLASSNAMEbooleanwaitingForResponseFor internal use only.-
Fields inherited from class com.vaadin.client.ui.VTabsheetBase
activeTabIndex, client, connector, disabled, disabledTabKeys, readonly, tabKeys
-
-
Constructor Summary
Constructors Constructor Description VTabsheet()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidblur()protected voidclearPaintables()Clears current tabs and contentsvoidfocus()Sets focus to this widget.ApplicationConnectiongetApplicationConnection()Deprecated.since 7.2 - use more specific methods instead (getRpcProxy(), getConnectorForWidget(Widget) etc.)protected intgetCloseTabKey()intgetContentAreaBorderWidth()For internal use only.com.google.gwt.user.client.ui.WidgetgetCurrentlyDisplayedWidget()Returns the currently displayed widget in the tab panel.protected intgetNextTabKey()protected intgetPreviousTabKey()protected TabsheetServerRpcgetRpcProxy()Returns the client to server RPC proxy for the tabsheet.protected intgetSelectTabKey()Gets the key to activate the selected tab when navigating using previous/next (left/right) keys.com.google.gwt.user.client.ElementgetSubPartElement(String subPart)Locates an element inside a component using the identifier provided insubPart.StringgetSubPartName(com.google.gwt.user.client.Element subElement)Provides an identifier that identifies the element within the component.ComponentConnectorgetTab(int index)Implement in extending classes.intgetTabCount()Implement in extending classes.Iterator<com.google.gwt.user.client.ui.Widget>getWidgetIterator()voidhandleStyleNames(AbstractComponentState state)For internal use only.voidhideTabs()Makes tab bar invisible.voidiLayout()Run internal layouting.booleanloadTabSheet(int tabIndex)Load the content of a tab of the provided index.voidonBrowserEvent(com.google.gwt.user.client.Event event)voidremoveTab(int index)Implement in extending classes.voidrenderContent(com.google.gwt.user.client.ui.Widget newWidget)Renders the widget content for a tab sheet.voidrenderTab(TabState tabState, int index)Implement in extending classes.voidselectTab(int index)For internal use only.voidsetConnector(AbstractComponentConnector connector)Sets the connector that should be notified of events etc.voidshowAllTabs()For internal use only.voidshowTabs()Makes tab bar visible.voidtabSizeMightHaveChanged(VTabsheet.Tab tab)voidupdateContentNodeHeight()For internal use only.voidupdateDynamicWidth()For internal use only.voidupdateOpenTabSize()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 com.google.gwt.user.client.ui.ComplexPanel
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove
-
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
-
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, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
-
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, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
CLASSNAME
public static final String CLASSNAME
- See Also:
- Constant Field Values
-
TABS_CLASSNAME
public static final String TABS_CLASSNAME
- See Also:
- Constant Field Values
-
SCROLLER_CLASSNAME
public static final String SCROLLER_CLASSNAME
- See Also:
- Constant Field Values
-
tabs
public final com.google.gwt.dom.client.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 com.google.gwt.dom.client.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.
-
-
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 com.google.gwt.user.client.ui.Widget getCurrentlyDisplayedWidget()
Returns the currently displayed widget in the tab panel.- Returns:
- currently displayed content widget
- Since:
- 7.2
-
getRpcProxy
protected 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(com.google.gwt.user.client.Event event)
- Specified by:
onBrowserEventin interfacecom.google.gwt.user.client.EventListener- Overrides:
onBrowserEventin classcom.google.gwt.user.client.ui.Widget
-
handleStyleNames
public void handleStyleNames(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(TabState tabState, int index)
Description copied from class:VTabsheetBaseImplement in extending classes. This method should render needed elements and set the visibility of the tab according to the 'selected' parameter.- Specified by:
renderTabin classVTabsheetBase
-
renderContent
public void renderContent(com.google.gwt.user.client.ui.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:VTabsheetBaseClears current tabs and contents- Specified by:
clearPaintablesin classVTabsheetBase
-
getWidgetIterator
public Iterator<com.google.gwt.user.client.ui.Widget> getWidgetIterator()
- Specified by:
getWidgetIteratorin classVTabsheetBase- 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:VTabsheetBaseImplement in extending classes. This method should return the number of tabs currently rendered.- Specified by:
getTabCountin classVTabsheetBase
-
getTab
public ComponentConnector getTab(int index)
Description copied from class:VTabsheetBaseImplement in extending classes. This method should return the Paintable corresponding to the given index.- Specified by:
getTabin classVTabsheetBase
-
removeTab
public void removeTab(int index)
Description copied from class:VTabsheetBaseImplement in extending classes. This method should remove the rendered tab with the specified index.- Specified by:
removeTabin classVTabsheetBase
-
selectTab
public void selectTab(int index)
Description copied from class:VTabsheetBaseFor internal use only. May be removed or replaced in the future.- Specified by:
selectTabin classVTabsheetBase
-
focus
public void focus()
Description copied from interface:FocusableSets focus to this widget.
-
blur
public void blur()
-
setConnector
public void setConnector(AbstractComponentConnector connector)
Description copied from class:VTabsheetBaseSets the connector that should be notified of events etc. For internal use only. This method may be removed or replaced in the future.- Overrides:
setConnectorin classVTabsheetBase
-
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(String subPart)
Description copied from interface:SubPartAwareLocates an element inside a component using the identifier provided insubPart. ThesubPartidentifier is component specific and may be any string of characters, numbers, space characters and brackets.- Specified by:
getSubPartElementin interfaceSubPartAware- 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 String getSubPartName(com.google.gwt.user.client.Element subElement)
Description copied from interface:SubPartAwareProvides an identifier that identifies the element within the component. ThesubElementis a part of the component and must never be null.Note!
getSubPartElement(getSubPartName(element)) == elementis not always true. A component can choose to provide a more generic identifier for any given element if the results of all interactions withsubElementare 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 assubElementbecause interactions with the DIV and the root button element produce the same result.- Specified by:
getSubPartNamein interfaceSubPartAware- Parameters:
subElement- The element the identifier string should uniquely identify- Returns:
- An identifier that uniquely identifies
subElementor null if no identifier could be provided.
-
-