Package com.vaadin.client.ui
Class VTabsheetBase
- 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
-
- 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,Iterable<com.google.gwt.user.client.ui.Widget>
- Direct Known Subclasses:
VAccordion,VTabsheet
public abstract class VTabsheetBase extends com.google.gwt.user.client.ui.ComplexPanel implements com.google.gwt.user.client.ui.HasEnabledBase class for a multi-view widget such as TabSheet or Accordion.- Author:
- Vaadin Ltd.
-
-
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 Modifier and Type Field Description protected intactiveTabIndexFor internal use only.protected ApplicationConnectionclientFor internal use only.protected AbstractComponentConnectorconnectorFor internal use only.protected booleandisabledFor internal use only.protected Set<String>disabledTabKeysFor internal use only.protected booleanreadonlyFor internal use only.protected List<String>tabKeysFor internal use only.
-
Constructor Summary
Constructors Constructor Description VTabsheetBase(String classname)Constructs a multi-view widget with the given classname.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddTabKey(String key, boolean disabled)For internal use only.protected abstract voidclearPaintables()Deprecated.This method is not called by the framework code anymore.voidclearTabKeys()For internal use only.protected ComponentConnectorgetConnectorForWidget(com.google.gwt.user.client.ui.Widget widget)For internal use only.abstract ComponentConnectorgetTab(int index)Implement in extending classes.abstract intgetTabCount()Implement in extending classes.abstract Iterator<com.google.gwt.user.client.ui.Widget>getWidgetIterator()protected booleanisDynamicHeight()Returns whether the height of the widget is undefined.protected booleanisDynamicWidth()Returns whether the width of the widget is undefined.booleanisEnabled()booleanisTabCaptionsAsHtml()Checks whether captions are rendered as HTML The default is false, i.e. render tab captions as plain textabstract voidremoveTab(int index)Implement in extending classes.abstract voidrenderTab(TabState tabState, int index)Implement in extending classes.abstract voidselectTab(int index)For internal use only.voidsetActiveTabIndex(int activeTabIndex)For internal use only.voidsetClient(ApplicationConnection client)For internal use only.voidsetConnector(AbstractComponentConnector connector)Sets the connector that should be notified of events etc.voidsetEnabled(boolean enabled)For internal use only.voidsetReadonly(boolean readonly)For internal use only.voidsetTabCaptionsAsHtml(boolean tabCaptionsAsHtml)Sets whether the caption is rendered as HTML.-
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, onBrowserEvent, 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
-
client
protected ApplicationConnection client
For internal use only. May be removed or replaced in the future.
-
tabKeys
protected final List<String> tabKeys
For internal use only. May be removed or replaced in the future.
-
disabledTabKeys
protected Set<String> disabledTabKeys
For internal use only. May be removed or replaced in the future.
-
activeTabIndex
protected int activeTabIndex
For internal use only. May be removed or replaced in the future.
-
disabled
protected boolean disabled
For internal use only. May be removed or replaced in the future.
-
readonly
protected boolean readonly
For internal use only. May be removed or replaced in the future.
-
connector
protected AbstractComponentConnector connector
For internal use only. May be removed or replaced in the future.
-
-
Constructor Detail
-
VTabsheetBase
public VTabsheetBase(String classname)
Constructs a multi-view widget with the given classname.- Parameters:
classname- the style name to set
-
-
Method Detail
-
getWidgetIterator
public abstract Iterator<com.google.gwt.user.client.ui.Widget> getWidgetIterator()
- Returns:
- a list of currently shown Widgets
-
clearPaintables
@Deprecated protected abstract void clearPaintables()
Deprecated.This method is not called by the framework code anymore.Clears current tabs and contents.
-
renderTab
public abstract void renderTab(TabState tabState, int index)
Implement in extending classes. This method should render needed elements and set the visibility of the tab according to the 'visible' parameter. This method should not update the selection, the connector should handle that separately.- Parameters:
tabState- shared state of a single tabindex- the index of that tab
-
getTabCount
public abstract int getTabCount()
Implement in extending classes. This method should return the number of tabs currently rendered.- Returns:
- the number of currently rendered tabs
-
getTab
public abstract ComponentConnector getTab(int index)
Implement in extending classes. This method should return the connector corresponding to the given index.- Parameters:
index- the index of the tab whose connector to find- Returns:
- the connector of the queried tab, or
nullif not found
-
removeTab
public abstract void removeTab(int index)
Implement in extending classes. This method should remove the rendered tab with the specified index.- Parameters:
index- the index of the tab to remove
-
isDynamicWidth
protected boolean isDynamicWidth()
Returns whether the width of the widget is undefined.- Returns:
trueif width of the widget is determined by its content,falseotherwise- Since:
- 7.2
-
isDynamicHeight
protected boolean isDynamicHeight()
Returns whether the height of the widget is undefined.- Returns:
trueif height of the widget is determined by its content,falseotherwise- Since:
- 7.2
-
setConnector
public void setConnector(AbstractComponentConnector connector)
Sets the connector that should be notified of events etc. For internal use only. This method may be removed or replaced in the future.- Parameters:
connector- the connector of this widget- Since:
- 7.2
-
clearTabKeys
public void clearTabKeys()
For internal use only. May be removed or replaced in the future.
-
addTabKey
public void addTabKey(String key, boolean disabled)
For internal use only. May be removed or replaced in the future.- Parameters:
key- an internal key that corresponds with a tabdisabled-trueif the tab should be disabled,falseotherwise
-
setClient
public void setClient(ApplicationConnection client)
For internal use only. May be removed or replaced in the future.- Parameters:
client- the current application connection instance
-
setActiveTabIndex
public void setActiveTabIndex(int activeTabIndex)
For internal use only. May be removed or replaced in the future.- Parameters:
activeTabIndex- the index of the currently active tab
-
setEnabled
public void setEnabled(boolean enabled)
For internal use only. May be removed or replaced in the future.- Specified by:
setEnabledin interfacecom.google.gwt.user.client.ui.HasEnabled
-
setReadonly
public void setReadonly(boolean readonly)
For internal use only. May be removed or replaced in the future.- Parameters:
readonly-trueif this widget should be read-only,falseotherwise
-
getConnectorForWidget
protected ComponentConnector getConnectorForWidget(com.google.gwt.user.client.ui.Widget widget)
For internal use only. May be removed or replaced in the future.- Parameters:
widget- the widget whose connector to find- Returns:
- the connector
-
selectTab
public abstract void selectTab(int index)
For internal use only. May be removed or replaced in the future.- Parameters:
index- the index of the tab to select
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabledin interfacecom.google.gwt.user.client.ui.HasEnabled
-
setTabCaptionsAsHtml
public void setTabCaptionsAsHtml(boolean tabCaptionsAsHtml)
Sets whether the caption is rendered as HTML.The default is false, i.e. render tab captions as plain text
This value is delegated from the TabsheetState.
- Parameters:
tabCaptionsAsHtml-trueif the captions are rendered as HTML,falseif rendered as plain text- Since:
- 7.4
-
isTabCaptionsAsHtml
public boolean isTabCaptionsAsHtml()
Checks whether captions are rendered as HTML The default is false, i.e. render tab captions as plain text- Returns:
- true if the captions are rendered as HTML, false if rendered as plain text
- Since:
- 7.4
-
-