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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
add
(com.vaadin.flow.component.Component component) Returns theViewBreadcrumbs
associated with this container.View<?>
getView()
Returns theView
contained in this container.protected void
remove
(com.vaadin.flow.component.Component component) protected void
void
Removes the breadcrumbs from this container.void
Removes theView
contained in this container.void
setBreadcrumbs
(ViewBreadcrumbs breadcrumbs) Sets theViewBreadcrumbs
for this container.protected void
setBreadcrumbsInternal
(ViewBreadcrumbs breadcrumbs) void
Sets the specifiedView
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
-
breadcrumbs
-
view
-
-
Constructor Details
-
TabViewContainer
public TabViewContainer()
-
-
Method Details
-
getBreadcrumbs
Description copied from interface:ViewContainer
Returns theViewBreadcrumbs
associated with this container.- Specified by:
getBreadcrumbs
in interfaceViewContainer
- Returns:
- the
ViewBreadcrumbs
instance if set, ornull
if no breadcrumbs are associated
-
setBreadcrumbs
Description copied from interface:ViewContainer
Sets theViewBreadcrumbs
for this container.- Specified by:
setBreadcrumbs
in interfaceViewContainer
- Parameters:
breadcrumbs
- theViewBreadcrumbs
instance to associate with this container, ornull
to remove any currently associated breadcrumbs
-
setBreadcrumbsInternal
-
removeBreadcrumbs
public void removeBreadcrumbs()Description copied from interface:ViewContainer
Removes the breadcrumbs from this container.- Specified by:
removeBreadcrumbs
in interfaceViewContainer
-
getView
Description copied from interface:ViewContainer
Returns theView
contained in this container.- Specified by:
getView
in interfaceViewContainer
- Returns:
- the current
View
if present, or null if no view is set
-
setView
Description copied from interface:ViewContainer
Sets the specifiedView
in this container.- Specified by:
setView
in interfaceViewContainer
- Parameters:
view
- theView
to set in this container, ornull
to remove
-
removeView
public void removeView()Description copied from interface:ViewContainer
Removes theView
contained in this container.- Specified by:
removeView
in interfaceViewContainer
-
add
protected void add(com.vaadin.flow.component.Component component) -
remove
protected void remove(com.vaadin.flow.component.Component component) -
removeAll
protected void removeAll()
-