Class MainTabSheetUtils
java.lang.Object
io.jmix.tabbedmode.component.tabsheet.MainTabSheetUtils
Utility class working with
MainTabSheet's specifics.-
Method Summary
Modifier and TypeMethodDescriptionstatic ViewContainerasViewContainer(com.vaadin.flow.component.Component component) Converts the givenComponentto aViewContainer.findViewFromContent(com.vaadin.flow.component.Component component) Attempts to find and return aViewassociated with the provided tab content.static View<?>getViewFromContent(com.vaadin.flow.component.Component component) Returns theViewassociated with the provided tab content.
-
Method Details
-
asViewContainer
Converts the givenComponentto aViewContainer.- Parameters:
component- the component to be cast toViewContainer- Returns:
- the component cast as
ViewContainerif it is an instance - Throws:
IllegalStateException- if the provided component is not aViewContainer
-
findViewFromContent
Attempts to find and return aViewassociated with the provided tab content. -
getViewFromContent
Returns theViewassociated with the provided tab content.- Parameters:
component- the component from which the associatedViewis to be retrieved- Returns:
- the
Viewassociated with the provided tab content - Throws:
IllegalStateException- if noViewis found within the provided component
-