Interface TabSheet.Tab

All Superinterfaces:
Component.HasCaption, Component.HasDescription, Component.HasIcon
All Known Implementing Classes:
TabSheetImpl.Tab
Enclosing interface:
TabSheet

public static interface TabSheet.Tab extends Component.HasIcon, Component.HasCaption
Tab interface.
  • Method Details

    • getName

      String getName()
      Returns:
      tab id.
    • setName

      void setName(String name)
      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

      @StudioProperty(name="enable", defaultValue="true") void setEnabled(boolean enabled)
      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

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

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

      void setCloseHandler(@Nullable TabSheet.TabCloseHandler tabCloseHandler)
      Sets a handler that can override the close behavior if isClosable() is true. Default action just removes the tab.
      Parameters:
      tabCloseHandler - tab close handler
    • getCloseHandler

      @Nullable TabSheet.TabCloseHandler 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

      @Nullable String 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