Package io.jmix.ui.component
Interface TabSheet.Tab
- All Superinterfaces:
Component.HasCaption
,Component.HasDescription
,Component.HasIcon
- All Known Implementing Classes:
TabSheetImpl.Tab
- Enclosing interface:
- TabSheet
Tab interface.
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
Returns the style for UI element that represents the tab header.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
setClosable
(boolean closable) Sets the closability status for the tab.void
setCloseHandler
(TabSheet.TabCloseHandler tabCloseHandler) Sets a handler that can override the close behavior ifisClosable()
is true.void
setEnabled
(boolean enabled) Sets the availability status for the tab.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.Methods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaption
Methods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescription
Methods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSet
-
Method Details
-
getName
String getName()- Returns:
- tab id.
-
setName
INTERNAL. Sets tab id. -
isEnabled
boolean isEnabled()Returns the availability status for the tab. A disabled tab is shown as such in the tab bar and cannot be selected.- Returns:
- true if tab is enabled, false otherwise
-
setEnabled
Sets the availability status for the tab. A disabled tab is shown as such in the tab bar and cannot be selected.- Parameters:
enabled
- true if tab is enabled, false otherwise
-
isVisible
boolean isVisible()Returns the visibility status for the tab. An invisible tab is not shown in the tab bar and cannot be selected.- Returns:
- true if tab is visible, false otherwise
-
setVisible
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.- Parameters:
visible
- true if tab is visible, false otherwise
-
isClosable
boolean isClosable()Returns the closability status for the tab.- Returns:
- true if the tab should be closable from the UI, false otherwise
-
setClosable
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.- Parameters:
closable
- true if the tab should be closable from the UI, false otherwise
-
setCloseHandler
Sets a handler that can override the close behavior ifisClosable()
is true. Default action just removes the tab.- Parameters:
tabCloseHandler
- tab close handler
-
getCloseHandler
- Returns:
- a tab close handler
-
setStyleName
@StudioProperty(name="stylename", type=CSS_CLASSNAME_LIST) void setStyleName(@Nullable String styleName) Sets style for UI element that represents the tab header.- Parameters:
styleName
- style name
-
getStyleName
Returns the style for UI element that represents the tab header.- Returns:
- the style name or
null
if no style name has been set
-