Package io.jmix.ui.component.impl
Class TabSheetImpl.Tab
java.lang.Object
io.jmix.ui.component.impl.TabSheetImpl.Tab
- All Implemented Interfaces:
Component.HasCaption,Component.HasDescription,Component.HasIcon,TabSheet.Tab
- Enclosing class:
- TabSheetImpl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetIcon()Get icon source: "font-icon:ADD", "icons/myicon.png", "theme://createIcon", etc.getName()Returns the style for UI element that represents the tab header.protected com.vaadin.ui.TabSheet.TabbooleanReturns the closability status for the tab.booleanReturns the availability status for the tab.booleanReturns the visibility status for the tab.voidsetCaption(String caption) Sets the component's caption.voidsetClosable(boolean closable) Sets the closability status for the tab.voidsetCloseHandler(TabSheet.TabCloseHandler tabCloseHandler) Sets a handler that can override the close behavior ifTabSheet.Tab.isClosable()is true.voidsetDescription(String description) Sets the component's description.voidsetEnabled(boolean enabled) Sets the availability status for the tab.voidSet an icon by its source: "font-icon:ADD", "icons/myicon.png", "theme://createIcon", etc.voidsetIconFromSet(Icons.Icon icon) Set an icon from an icon set.voidINTERNAL.voidsetStyleName(String styleName) Sets style for UI element that represents the tab header.voidsetVisible(boolean visible) Sets the visibility status for the tab.
-
Constructor Details
-
Tab
-
-
Method Details
-
getVaadinTab
protected com.vaadin.ui.TabSheet.Tab getVaadinTab() -
getComponent
-
getName
- Specified by:
getNamein interfaceTabSheet.Tab- Returns:
- tab id.
-
setName
Description copied from interface:TabSheet.TabINTERNAL. Sets tab id.- Specified by:
setNamein interfaceTabSheet.Tab
-
getCaption
- Specified by:
getCaptionin interfaceComponent.HasCaption- Returns:
- the caption of the component
-
setCaption
Description copied from interface:Component.HasCaptionSets the component's caption.- Specified by:
setCaptionin interfaceComponent.HasCaption- Parameters:
caption- the new component's caption
-
isEnabled
public boolean isEnabled()Description copied from interface:TabSheet.TabReturns the availability status for the tab. A disabled tab is shown as such in the tab bar and cannot be selected.- Specified by:
isEnabledin interfaceTabSheet.Tab- Returns:
- true if tab is enabled, false otherwise
-
setEnabled
public void setEnabled(boolean enabled) Description copied from interface:TabSheet.TabSets the availability status for the tab. A disabled tab is shown as such in the tab bar and cannot be selected.- Specified by:
setEnabledin interfaceTabSheet.Tab- Parameters:
enabled- true if tab is enabled, false otherwise
-
isVisible
public boolean isVisible()Description copied from interface:TabSheet.TabReturns the visibility status for the tab. An invisible tab is not shown in the tab bar and cannot be selected.- Specified by:
isVisiblein interfaceTabSheet.Tab- Returns:
- true if tab is visible, false otherwise
-
setVisible
public void setVisible(boolean visible) Description copied from interface:TabSheet.TabSets the visibility status for the tab. An invisible tab is not shown in the tab bar and cannot be selected, selection is changed automatically when there is an attempt to select an invisible tab.- Specified by:
setVisiblein interfaceTabSheet.Tab- Parameters:
visible- true if tab is visible, false otherwise
-
isClosable
public boolean isClosable()Description copied from interface:TabSheet.TabReturns the closability status for the tab.- Specified by:
isClosablein interfaceTabSheet.Tab- Returns:
- true if the tab should be closable from the UI, false otherwise
-
setClosable
public void setClosable(boolean closable) Description copied from interface:TabSheet.TabSets the closability status for the tab. It controls if a close button is shown to the user or not. A closable tab can be closed by the user through the user interface.- Specified by:
setClosablein interfaceTabSheet.Tab- Parameters:
closable- true if the tab should be closable from the UI, false otherwise
-
getCloseHandler
- Specified by:
getCloseHandlerin interfaceTabSheet.Tab- Returns:
- a tab close handler
-
setCloseHandler
Description copied from interface:TabSheet.TabSets a handler that can override the close behavior ifTabSheet.Tab.isClosable()is true. Default action just removes the tab.- Specified by:
setCloseHandlerin interfaceTabSheet.Tab- Parameters:
tabCloseHandler- tab close handler
-
setStyleName
Description copied from interface:TabSheet.TabSets style for UI element that represents the tab header.- Specified by:
setStyleNamein interfaceTabSheet.Tab- Parameters:
styleName- style name
-
getStyleName
Description copied from interface:TabSheet.TabReturns the style for UI element that represents the tab header.- Specified by:
getStyleNamein interfaceTabSheet.Tab- Returns:
- the style name or
nullif no style name has been set
-
getIcon
Description copied from interface:Component.HasIconGet icon source: "font-icon:ADD", "icons/myicon.png", "theme://createIcon", etc.- Specified by:
getIconin interfaceComponent.HasIcon
-
setIcon
Description copied from interface:Component.HasIconSet an icon by its source: "font-icon:ADD", "icons/myicon.png", "theme://createIcon", etc.- Specified by:
setIconin interfaceComponent.HasIcon
-
setIconFromSet
Description copied from interface:Component.HasIconSet an icon from an icon set.- Specified by:
setIconFromSetin interfaceComponent.HasIcon
-
setDescription
Description copied from interface:Component.HasDescriptionSets the component's description.- Specified by:
setDescriptionin interfaceComponent.HasDescription- Parameters:
description- the new description to set
-
getDescription
- Specified by:
getDescriptionin interfaceComponent.HasDescription- Returns:
- the components description, used in tooltips
-