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.
  • Field Details

  • Method Details

    • addTab

      TabSheet.Tab addTab(String name, Component component)
      Adds a new tab to the component.
      Parameters:
      name - id of the new tab
      component - a component that will be the content of the new tab
      Returns:
      the new tab
    • addLazyTab

      TabSheet.Tab addLazyTab(String name, org.dom4j.Element descriptor, ComponentLoader loader)
      INTERNAL. Adds a new lazy tab to the component.
      Parameters:
      name - id of the new tab
      descriptor - the element descriptor
      loader - the component loader
      Returns:
      the new tab
    • removeTab

      void removeTab(String name)
      Removes a tab.
      Parameters:
      name - id of the tab to remove
    • removeAllTabs

      void removeAllTabs()
      Removes all tabs.
    • getSelectedTab

      @Nullable TabSheet.Tab getSelectedTab()
      Gets selected tab. May be null if the tabsheet does not contain tabs at all.
      Returns:
      a selected tab instance
    • setSelectedTab

      void setSelectedTab(TabSheet.Tab tab)
      Sets selected tab.
      Parameters:
      tab - tab instance
    • setSelectedTab

      void setSelectedTab(String name)
      Sets selected tab.
      Parameters:
      name - tab id
    • getTab

      @Nullable TabSheet.Tab getTab(String name)
      Gets tab with the provided id.
      Parameters:
      name - tab id
      Returns:
      tab instance
    • getTabComponent

      Component getTabComponent(String name)
      Gets a component that is a content of the tab.
      Parameters:
      name - tab id
      Returns:
      tab content
    • 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

      @StudioProperty(defaultValue="false") void setTabCaptionsAsHtml(boolean tabCaptionsAsHtml)
      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

      @StudioProperty(defaultValue="true") void setTabsVisible(boolean tabsVisible)
      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

      Subscription addSelectedTabChangeListener(Consumer<TabSheet.SelectedTabChangeEvent> listener)
      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