Package io.jmix.ui.component
Interface TabSheet
- All Superinterfaces:
Component
,Component.BelongToFrame
,Component.Focusable
,Component.HasCaption
,Component.HasDescription
,Component.HasIcon
,ComponentContainer
,HasComponents
,HasContextHelp
,HasHtmlCaption
,HasHtmlDescription
,HasHtmlSanitizer
- All Known Implementing Classes:
TabSheetImpl
@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%/ui/vcl/containers/tab-sheet.html")
public interface TabSheet
extends ComponentContainer, Component.BelongToFrame, Component.HasIcon, Component.HasCaption, Component.Focusable, HasContextHelp, HasHtmlCaption, HasHtmlDescription, HasHtmlSanitizer
TabSheet component interface.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
SelectedTabChangeEvents are fired when a selected tab is changed.static interface
Tab interface.static interface
Handler that overrides the default behavior ifTabSheet.Tab.isClosable()
is true and a user clicks the close button.Nested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent
-
Field Summary
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
-
Method Summary
Modifier and TypeMethodDescriptionaddLazyTab
(String name, org.dom4j.Element descriptor, ComponentLoader loader) INTERNAL.Adds a listener that will be notified when a selected tab is changed.Adds a new tab to the component.Gets selected tab.Gets tab with the provided id.getTabComponent
(String name) Gets a component that is a content of the tab.getTabs()
Gets all tabs.boolean
boolean
void
Removes all tabs.void
Removes a tab.void
Sets selected tab.void
setSelectedTab
(String name) 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.Methods inherited from interface io.jmix.ui.component.Component
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
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrame
Methods inherited from interface io.jmix.ui.component.Component.Focusable
focus, getTabIndex, isFocusable, setFocusable, setTabIndex
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
Methods inherited from interface io.jmix.ui.component.ComponentContainer
add, add, remove, remove, removeAll
Methods inherited from interface io.jmix.ui.component.HasComponents
focusFirstComponent, getComponent, getComponentNN, getComponents, getOwnComponent, getOwnComponents, getOwnComponentsStream
Methods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
Methods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
-
Field Details
-
NAME
- See Also:
-
-
Method Details
-
addTab
Adds a new tab to the component.- Parameters:
name
- id of the new tabcomponent
- a component that will be the content of the new tab- Returns:
- the new tab
-
addLazyTab
INTERNAL. Adds a new lazy tab to the component.- Parameters:
name
- id of the new tabdescriptor
- the element descriptorloader
- the component loader- Returns:
- the new tab
-
removeTab
Removes a tab.- Parameters:
name
- id of the tab to remove
-
removeAllTabs
void removeAllTabs()Removes all tabs. -
getSelectedTab
Gets selected tab. May be null if the tabsheet does not contain tabs at all.- Returns:
- a selected tab instance
-
setSelectedTab
Sets selected tab.- Parameters:
tab
- tab instance
-
setSelectedTab
Sets selected tab.- Parameters:
name
- tab id
-
getTab
Gets tab with the provided id.- Parameters:
name
- tab id- Returns:
- tab instance
-
getTabComponent
Gets a component that is a content of the tab.- Parameters:
name
- tab id- Returns:
- tab content
-
getTabs
Collection<TabSheet.Tab> getTabs()Gets all tabs.- Returns:
- the collection of tab instances
-
isTabCaptionsAsHtml
boolean isTabCaptionsAsHtml()- Returns:
- true if the tab captions are rendered as HTML, false if rendered as plain text
-
setTabCaptionsAsHtml
Sets whether HTML is allowed in the tab captions.- Parameters:
tabCaptionsAsHtml
- true if the tab captions are rendered as HTML, false if rendered as plain text
-
isTabsVisible
boolean isTabsVisible()- Returns:
- true if the tabs are shown in the UI, false otherwise
-
setTabsVisible
Sets whether the tab selection part should be shown in the UI.- Parameters:
tabsVisible
- true if the tabs should be shown in the UI, false otherwise
-
addSelectedTabChangeListener
Adds a listener that will be notified when a selected tab is changed.- Parameters:
listener
- a listener to add- Returns:
- a registration object for removing an event listener
-