Class MainTabSheetUtils

java.lang.Object
io.jmix.tabbedmode.component.tabsheet.MainTabSheetUtils

public final class MainTabSheetUtils extends Object
Utility class working with MainTabSheet's specifics.
  • Method Details

    • asViewContainer

      public static ViewContainer asViewContainer(com.vaadin.flow.component.Component component)
      Converts the given Component to a ViewContainer.
      Parameters:
      component - the component to be cast to ViewContainer
      Returns:
      the component cast as ViewContainer if it is an instance
      Throws:
      IllegalStateException - if the provided component is not a ViewContainer
    • findViewFromContent

      public static Optional<View<?>> findViewFromContent(com.vaadin.flow.component.Component component)
      Attempts to find and return a View associated with the provided tab content.
      Parameters:
      component - the component from which the view is to be determined
      Returns:
      an Optional containing the found View, or an empty Optional if no view can be determined
    • getViewFromContent

      public static View<?> getViewFromContent(com.vaadin.flow.component.Component component)
      Returns the View associated with the provided tab content.
      Parameters:
      component - the component from which the associated View is to be retrieved
      Returns:
      the View associated with the provided tab content
      Throws:
      IllegalStateException - if no View is found within the provided component