Class TabViewContainer

java.lang.Object
com.vaadin.flow.component.Component
io.jmix.tabbedmode.component.viewcontainer.TabViewContainer
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, ViewContainer, Serializable

@Tag("jmix-view-container") @JsModule("./src/viewcontainer/jmix-view-container.js") public class TabViewContainer extends com.vaadin.flow.component.Component implements ViewContainer, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle
Represents a UI component that acts as a container for View instances and their associated ViewBreadcrumbs. The TabViewContainer provides mechanisms to manage and dynamically update views and breadcrumbs.

The container ensures that only one View can be set at a time. Adding a new view automatically removes the existing one. Similarly, breadcrumbs when set are associated with the container and displayed correctly using a defined slot.

See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected ViewBreadcrumbs
     
    protected View<?>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    add(com.vaadin.flow.component.Component component)
     
    Returns the ViewBreadcrumbs associated with this container.
    View<?>
    Returns the View contained in this container.
    protected void
    remove(com.vaadin.flow.component.Component component)
     
    protected void
     
    void
    Removes the breadcrumbs from this container.
    void
    Removes the View contained in this container.
    void
    Sets the ViewBreadcrumbs for this container.
    protected void
     
    void
    setView(View<?> view)
    Sets the specified View in this container.

    Methods inherited from class com.vaadin.flow.component.Component

    addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisible

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.HasElement

    getElement

    Methods inherited from interface com.vaadin.flow.component.HasSize

    getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
  • Field Details

  • Constructor Details

    • TabViewContainer

      public TabViewContainer()
  • Method Details

    • getBreadcrumbs

      @Nullable public ViewBreadcrumbs getBreadcrumbs()
      Description copied from interface: ViewContainer
      Returns the ViewBreadcrumbs associated with this container.
      Specified by:
      getBreadcrumbs in interface ViewContainer
      Returns:
      the ViewBreadcrumbs instance if set, or null if no breadcrumbs are associated
    • setBreadcrumbs

      public void setBreadcrumbs(@Nullable ViewBreadcrumbs breadcrumbs)
      Description copied from interface: ViewContainer
      Sets the ViewBreadcrumbs for this container.
      Specified by:
      setBreadcrumbs in interface ViewContainer
      Parameters:
      breadcrumbs - the ViewBreadcrumbs instance to associate with this container, or null to remove any currently associated breadcrumbs
    • setBreadcrumbsInternal

      protected void setBreadcrumbsInternal(ViewBreadcrumbs breadcrumbs)
    • removeBreadcrumbs

      public void removeBreadcrumbs()
      Description copied from interface: ViewContainer
      Removes the breadcrumbs from this container.
      Specified by:
      removeBreadcrumbs in interface ViewContainer
    • getView

      @Nullable public View<?> getView()
      Description copied from interface: ViewContainer
      Returns the View contained in this container.
      Specified by:
      getView in interface ViewContainer
      Returns:
      the current View if present, or null if no view is set
    • setView

      public void setView(@Nullable View<?> view)
      Description copied from interface: ViewContainer
      Sets the specified View in this container.
      Specified by:
      setView in interface ViewContainer
      Parameters:
      view - the View to set in this container, or null to remove
    • removeView

      public void removeView()
      Description copied from interface: ViewContainer
      Removes the View contained in this container.
      Specified by:
      removeView in interface ViewContainer
    • add

      protected void add(com.vaadin.flow.component.Component component)
    • remove

      protected void remove(com.vaadin.flow.component.Component component)
    • removeAll

      protected void removeAll()