protected class TabSheetImpl.Tab extends java.lang.Object implements TabSheet.Tab
Constructor and Description |
---|
Tab(java.lang.String name,
Component tabComponent) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCaption() |
TabSheet.TabCloseHandler |
getCloseHandler() |
Component |
getComponent() |
java.lang.String |
getDescription() |
java.lang.String |
getIcon()
Get icon source: "font-icon:ADD", "icons/myicon.png", "theme://createIcon", etc.
|
java.lang.String |
getName() |
java.lang.String |
getStyleName()
Returns the style for UI element that represents the tab header.
|
protected com.vaadin.ui.TabSheet.Tab |
getVaadinTab() |
boolean |
isClosable()
Returns the closability status for the tab.
|
boolean |
isEnabled()
Returns the availability status for the tab.
|
boolean |
isVisible()
Returns the visibility status for the tab.
|
void |
setCaption(java.lang.String caption)
Sets the component's caption.
|
void |
setClosable(boolean closable)
Sets the closability status for the tab.
|
void |
setCloseHandler(TabSheet.TabCloseHandler tabCloseHandler)
Sets a handler that can override the close behavior if
TabSheet.Tab.isClosable() is true. |
void |
setDescription(java.lang.String description)
Sets the component's description.
|
void |
setEnabled(boolean enabled)
Sets the availability status for the tab.
|
void |
setIcon(java.lang.String icon)
Set an icon by its source: "font-icon:ADD", "icons/myicon.png", "theme://createIcon", etc.
|
void |
setIconFromSet(Icons.Icon icon)
Set an icon from an icon set.
|
void |
setName(java.lang.String name)
INTERNAL.
|
void |
setStyleName(java.lang.String styleName)
Sets style for UI element that represents the tab header.
|
void |
setVisible(boolean visible)
Sets the visibility status for the tab.
|
public Tab(java.lang.String name, Component tabComponent)
protected com.vaadin.ui.TabSheet.Tab getVaadinTab()
public Component getComponent()
public java.lang.String getName()
getName
in interface TabSheet.Tab
public void setName(java.lang.String name)
TabSheet.Tab
setName
in interface TabSheet.Tab
@Nullable public java.lang.String getCaption()
getCaption
in interface Component.HasCaption
public void setCaption(@Nullable java.lang.String caption)
Component.HasCaption
setCaption
in interface Component.HasCaption
caption
- the new component's captionpublic boolean isEnabled()
TabSheet.Tab
isEnabled
in interface TabSheet.Tab
public void setEnabled(boolean enabled)
TabSheet.Tab
setEnabled
in interface TabSheet.Tab
enabled
- true if tab is enabled, false otherwisepublic boolean isVisible()
TabSheet.Tab
isVisible
in interface TabSheet.Tab
public void setVisible(boolean visible)
TabSheet.Tab
setVisible
in interface TabSheet.Tab
visible
- true if tab is visible, false otherwisepublic boolean isClosable()
TabSheet.Tab
isClosable
in interface TabSheet.Tab
public void setClosable(boolean closable)
TabSheet.Tab
setClosable
in interface TabSheet.Tab
closable
- true if the tab should be closable from the UI, false otherwise@Nullable public TabSheet.TabCloseHandler getCloseHandler()
getCloseHandler
in interface TabSheet.Tab
public void setCloseHandler(@Nullable TabSheet.TabCloseHandler tabCloseHandler)
TabSheet.Tab
TabSheet.Tab.isClosable()
is true.
Default action just removes the tab.setCloseHandler
in interface TabSheet.Tab
tabCloseHandler
- tab close handlerpublic void setStyleName(java.lang.String styleName)
TabSheet.Tab
setStyleName
in interface TabSheet.Tab
styleName
- style namepublic java.lang.String getStyleName()
TabSheet.Tab
getStyleName
in interface TabSheet.Tab
null
if no style name has been set@Nullable public java.lang.String getIcon()
Component.HasIcon
getIcon
in interface Component.HasIcon
public void setIcon(@Nullable java.lang.String icon)
Component.HasIcon
setIcon
in interface Component.HasIcon
public void setIconFromSet(@Nullable Icons.Icon icon)
Component.HasIcon
setIconFromSet
in interface Component.HasIcon
public void setDescription(@Nullable java.lang.String description)
Component.HasDescription
setDescription
in interface Component.HasDescription
description
- the new description to set@Nullable public java.lang.String getDescription()
getDescription
in interface Component.HasDescription