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:
public abstract class VTabsheetBase extends com.google.gwt.user.client.ui.ComplexPanel implements com.google.gwt.user.client.ui.HasEnabled
Base 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 int
activeTabIndex
For internal use only.
protected ApplicationConnection
client
For internal use only.
protected AbstractComponentConnector
connector
For internal use only.
protected boolean
disabled
For internal use only.
protected Set<String>
disabledTabKeys
For internal use only.
protected boolean
readonly
For internal use only.
protected List<String>
tabKeys
For internal use only.
-
Constructor Summary
Constructors Constructor Description VTabsheetBase(String classname)
Constructs a multi-view widget with the given classname.
-
Method Summary
All Methods Modifier and Type Method Description void
addTabKey(String key, boolean disabled)
For internal use only.
protected abstract void
clearPaintables()
Deprecated.
This method is not called by the framework code anymore.void
clearTabKeys()
For internal use only.
protected ComponentConnector
getConnectorForWidget(com.google.gwt.user.client.ui.Widget widget)
For internal use only.
abstract ComponentConnector
getTab(int index)
Implement in extending classes.
abstract int
getTabCount()
Implement in extending classes.
abstract Iterator<com.google.gwt.user.client.ui.Widget>
getWidgetIterator()
protected boolean
isDynamicHeight()
Returns whether the height of the widget is undefined.
protected boolean
isDynamicWidth()
Returns whether the width of the widget is undefined.
boolean
isEnabled()
boolean
isTabCaptionsAsHtml()
Checks whether captions are rendered as HTML The default is false, i.e.
abstract void
removeTab(int index)
Implement in extending classes.
abstract void
renderTab(TabState tabState, int index)
Implement in extending classes.
abstract void
selectTab(int index)
For internal use only.
void
setActiveTabIndex(int activeTabIndex)
For internal use only.
void
setClient(ApplicationConnection client)
For internal use only.
void
setConnector(AbstractComponentConnector connector)
Sets the connector that should be notified of events etc.
void
setEnabled(boolean enabled)
For internal use only.
void
setReadonly(boolean readonly)
For internal use only.
void
setTabCaptionsAsHtml(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 findReturns:
the connector of the queried tab, or
null
if 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:
true
if width of the widget is determined by its content,false
otherwiseSince:
7.2
-
isDynamicHeight
protected boolean isDynamicHeight()
Returns whether the height of the widget is undefined.
Returns:
true
if height of the widget is determined by its content,false
otherwiseSince:
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 widgetSince:
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
-true
if the tab should be disabled,false
otherwise
-
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:
setEnabled
in 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
-true
if this widget should be read-only,false
otherwise
-
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 findReturns:
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:
isEnabled
in 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
-true
if the captions are rendered as HTML,false
if rendered as plain textSince:
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
-
-