@StudioComponent(caption="TabSheet", category="Containers", xmlElement="tabSheet", icon="io/jmix/ui/icon/container/tabSheet.svg", canvasBehaviour=CONTAINER, containerType=TAB_SHEET, documentationURL="https://docs.jmix.io/jmix/%VERSION%/backoffice-ui/vcl/containers/tab-sheet.html") public interface TabSheet extends ComponentContainer, Component.BelongToFrame, Component.HasIcon, Component.HasCaption, Component.Focusable, HasContextHelp, HasHtmlCaption, HasHtmlDescription, HasHtmlSanitizer
Modifier and Type | Interface and Description |
---|---|
static class |
TabSheet.SelectedTabChangeEvent
SelectedTabChangeEvents are fired when a selected tab is changed.
|
static interface |
TabSheet.Tab
Tab interface.
|
static interface |
TabSheet.TabCloseHandler
Handler that overrides the default behavior if
TabSheet.Tab.isClosable() is true and a user clicks the close
button. |
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
HasContextHelp.ContextHelpIconClickEvent
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Modifier and Type | Method and Description |
---|---|
TabSheet.Tab |
addLazyTab(java.lang.String name,
org.dom4j.Element descriptor,
ComponentLoader loader)
INTERNAL.
|
io.jmix.core.common.event.Subscription |
addSelectedTabChangeListener(java.util.function.Consumer<TabSheet.SelectedTabChangeEvent> listener)
Adds a listener that will be notified when a selected tab is changed.
|
TabSheet.Tab |
addTab(java.lang.String name,
Component component)
Adds a new tab to the component.
|
TabSheet.Tab |
getSelectedTab()
Gets selected tab.
|
TabSheet.Tab |
getTab(java.lang.String name)
Gets tab with the provided id.
|
Component |
getTabComponent(java.lang.String name)
Gets a component that is a content of the tab.
|
java.util.Collection<TabSheet.Tab> |
getTabs()
Gets all tabs.
|
boolean |
isTabCaptionsAsHtml() |
boolean |
isTabsVisible() |
void |
removeAllTabs()
Removes all tabs.
|
void |
removeTab(java.lang.String name)
Removes a tab.
|
void |
setSelectedTab(java.lang.String name)
Sets selected tab.
|
void |
setSelectedTab(TabSheet.Tab tab)
Sets selected tab.
|
void |
setTabCaptionsAsHtml(boolean tabCaptionsAsHtml)
Sets whether HTML is allowed in the tab captions.
|
void |
setTabsVisible(boolean tabsVisible)
Sets whether the tab selection part should be shown in the UI.
|
add, add, remove, remove, removeAll
focusFirstComponent, getComponent, getComponentNN, getComponents, getOwnComponent, getOwnComponents, getOwnComponentsStream
getFrame, setFrame
getIcon, setIcon, setIconFromSet
focus, getTabIndex, isFocusable, setFocusable, setTabIndex
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
isCaptionAsHtml, setCaptionAsHtml
getCaption, setCaption
getDescription, setDescription
isDescriptionAsHtml, setDescriptionAsHtml
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
static final java.lang.String NAME
TabSheet.Tab addTab(java.lang.String name, Component component)
name
- id of the new tabcomponent
- a component that will be the content of the new tabTabSheet.Tab addLazyTab(java.lang.String name, org.dom4j.Element descriptor, ComponentLoader loader)
name
- id of the new tabdescriptor
- the element descriptorloader
- the component loadervoid removeTab(java.lang.String name)
name
- id of the tab to removevoid removeAllTabs()
@Nullable TabSheet.Tab getSelectedTab()
void setSelectedTab(TabSheet.Tab tab)
tab
- tab instancevoid setSelectedTab(java.lang.String name)
name
- tab id@Nullable TabSheet.Tab getTab(java.lang.String name)
name
- tab idComponent getTabComponent(java.lang.String name)
name
- tab idjava.util.Collection<TabSheet.Tab> getTabs()
boolean isTabCaptionsAsHtml()
@StudioProperty(defaultValue="false") void setTabCaptionsAsHtml(boolean tabCaptionsAsHtml)
tabCaptionsAsHtml
- true if the tab captions are rendered as HTML, false if rendered as plain textboolean isTabsVisible()
@StudioProperty(defaultValue="true") void setTabsVisible(boolean tabsVisible)
tabsVisible
- true if the tabs should be shown in the UI, false otherwiseio.jmix.core.common.event.Subscription addSelectedTabChangeListener(java.util.function.Consumer<TabSheet.SelectedTabChangeEvent> listener)
listener
- a listener to add