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
-
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.Tab
boolean
Returns the closability status for the tab.boolean
Returns the availability status for the tab.boolean
Returns the visibility status for the tab.void
setCaption
(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 ifTabSheet.Tab.isClosable()
is true.void
setDescription
(String description) Sets the component's description.void
setEnabled
(boolean enabled) Sets the availability status for the tab.void
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
INTERNAL.void
setStyleName
(String styleName) Sets style for UI element that represents the tab header.void
setVisible
(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:
getName
in interfaceTabSheet.Tab
- Returns:
- tab id.
-
setName
Description copied from interface:TabSheet.Tab
INTERNAL. Sets tab id.- Specified by:
setName
in interfaceTabSheet.Tab
-
getCaption
- Specified by:
getCaption
in interfaceComponent.HasCaption
- Returns:
- the caption of the component
-
setCaption
Description copied from interface:Component.HasCaption
Sets the component's caption.- Specified by:
setCaption
in interfaceComponent.HasCaption
- Parameters:
caption
- the new component's caption
-
isEnabled
public boolean isEnabled()Description copied from interface:TabSheet.Tab
Returns the availability status for the tab. A disabled tab is shown as such in the tab bar and cannot be selected.- Specified by:
isEnabled
in interfaceTabSheet.Tab
- Returns:
- true if tab is enabled, false otherwise
-
setEnabled
public void setEnabled(boolean enabled) Description copied from interface:TabSheet.Tab
Sets the availability status for the tab. A disabled tab is shown as such in the tab bar and cannot be selected.- Specified by:
setEnabled
in interfaceTabSheet.Tab
- Parameters:
enabled
- true if tab is enabled, false otherwise
-
isVisible
public boolean isVisible()Description copied from interface:TabSheet.Tab
Returns the visibility status for the tab. An invisible tab is not shown in the tab bar and cannot be selected.- Specified by:
isVisible
in interfaceTabSheet.Tab
- Returns:
- true if tab is visible, false otherwise
-
setVisible
public void setVisible(boolean visible) Description copied from interface:TabSheet.Tab
Sets 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:
setVisible
in interfaceTabSheet.Tab
- Parameters:
visible
- true if tab is visible, false otherwise
-
isClosable
public boolean isClosable()Description copied from interface:TabSheet.Tab
Returns the closability status for the tab.- Specified by:
isClosable
in 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.Tab
Sets 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:
setClosable
in interfaceTabSheet.Tab
- Parameters:
closable
- true if the tab should be closable from the UI, false otherwise
-
getCloseHandler
- Specified by:
getCloseHandler
in interfaceTabSheet.Tab
- Returns:
- a tab close handler
-
setCloseHandler
Description copied from interface:TabSheet.Tab
Sets a handler that can override the close behavior ifTabSheet.Tab.isClosable()
is true. Default action just removes the tab.- Specified by:
setCloseHandler
in interfaceTabSheet.Tab
- Parameters:
tabCloseHandler
- tab close handler
-
setStyleName
Description copied from interface:TabSheet.Tab
Sets style for UI element that represents the tab header.- Specified by:
setStyleName
in interfaceTabSheet.Tab
- Parameters:
styleName
- style name
-
getStyleName
Description copied from interface:TabSheet.Tab
Returns the style for UI element that represents the tab header.- Specified by:
getStyleName
in interfaceTabSheet.Tab
- Returns:
- the style name or
null
if no style name has been set
-
getIcon
Description copied from interface:Component.HasIcon
Get icon source: "font-icon:ADD", "icons/myicon.png", "theme://createIcon", etc.- Specified by:
getIcon
in interfaceComponent.HasIcon
-
setIcon
Description copied from interface:Component.HasIcon
Set an icon by its source: "font-icon:ADD", "icons/myicon.png", "theme://createIcon", etc.- Specified by:
setIcon
in interfaceComponent.HasIcon
-
setIconFromSet
Description copied from interface:Component.HasIcon
Set an icon from an icon set.- Specified by:
setIconFromSet
in interfaceComponent.HasIcon
-
setDescription
Description copied from interface:Component.HasDescription
Sets the component's description.- Specified by:
setDescription
in interfaceComponent.HasDescription
- Parameters:
description
- the new description to set
-
getDescription
- Specified by:
getDescription
in interfaceComponent.HasDescription
- Returns:
- the components description, used in tooltips
-