public class Tab extends GeneratedVaadinTab<Tab> implements HasComponents
vaadin-tab
element.Constructor and Description |
---|
Tab()
Constructs a new object in its default state.
|
Tab(Component... components)
Constructs a new object with child components.
|
Tab(String label)
Constructs a new object with the given label.
|
Modifier and Type | Method and Description |
---|---|
double |
getFlexGrow()
Gets the flex grow property of this tab.
|
String |
getLabel()
Gets the label of this tab.
|
boolean |
isEnabled()
If
false , the user cannot interact with this element. |
boolean |
isSelected()
If true, the item is in selected state.
|
void |
setEnabled(boolean enabled)
If
false , the user cannot interact with this element. |
void |
setFlexGrow(double flexGrow)
Sets the flex grow property of this tab.
|
void |
setLabel(String label)
Sets the label of this tab.
|
void |
setSelected(boolean selected)
Description copied from corresponding location in WebComponent:
|
String |
toString() |
addThemeVariants, getValueString, isDisabledBoolean, isSelectedBoolean, removeThemeVariants, setDisabled, setValue
addListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getUI, hasListener, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisible
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
add, addComponentAsFirst, addComponentAtIndex, remove, removeAll
getElement
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeName
addAttachListener
addDetachListener
public Tab()
public Tab(String label)
label
- the label to displaypublic Tab(Component... components)
components
- the child componentspublic final String getLabel()
public final void setLabel(String label)
label
- the label to displaypublic void setFlexGrow(double flexGrow)
For example, if all components have a flex grow property value set to 1, the remaining space in the layout will be distributed equally to all components inside the layout. If you set a flex grow property of one component to 2, that component will take twice the available space as the other components, and so on.
Setting to flex grow property value 0 disables the expansion of the component. Negative values are not allowed.
flexGrow
- the proportion of the available space the tab should take uppublic double getFlexGrow()
public void setEnabled(boolean enabled)
If false
, the user cannot interact with this element.
setEnabled
in interface HasEnabled
enabled
- the boolean value to setpublic boolean isEnabled()
If false
, the user cannot interact with this element.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
isEnabled
in interface HasEnabled
disabled
property value from the
webcomponentpublic void setSelected(boolean selected)
GeneratedVaadinTab
Description copied from corresponding location in WebComponent:
If true, the item is in selected state.
setSelected
in class GeneratedVaadinTab<Tab>
selected
- the boolean value to setpublic boolean isSelected()
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
If aTab
instance is used inside Tabs
component then
selected state is updated based on currently selected tab. So the value
is the same as Tabs.getSelectedTab()
.selected
property from the webcomponentTabs.getSelectedTab()
Copyright © 2018. All rights reserved.