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.booleanReturns the closability status for the tab.booleanReturns the availability status for the tab.booleanReturns the visibility status for the tab.voidsetClosable(boolean closable) Sets the closability status for the tab.voidsetCloseHandler(TabSheet.TabCloseHandler tabCloseHandler) Sets a handler that can override the close behavior ifisClosable()is true.voidsetEnabled(boolean enabled) Sets the availability status for the tab.voidINTERNAL.voidsetStyleName(String styleName) Sets style for UI element that represents the tab header.voidsetVisible(boolean visible) Sets the visibility status for the tab.Methods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaptionMethods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescriptionMethods 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
nullif no style name has been set
-