Package com.vaadin.flow.router
Interface RouterLayout
-
- All Superinterfaces:
HasElement
,Serializable
- All Known Implementing Classes:
JavaScriptBootstrapUI
,UI
,WebComponentUI
public interface RouterLayout extends HasElement
Implementations of this interface represent a parent for a navigation target components via theRoute.layout()
parameter.- Since:
- 1.0
- Author:
- Vaadin Ltd
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
removeRouterLayoutContent(HasElement oldContent)
Removes content that should no longer be shown in this router layout.default void
showRouterLayoutContent(HasElement content)
Shows the content of the layout which is the router target component annotated with a@Route
.-
Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
-
-
-
-
Method Detail
-
showRouterLayoutContent
default void showRouterLayoutContent(HasElement content)
Shows the content of the layout which is the router target component annotated with a@Route
.Note implementors should not care about old
@Route
content, since it's handled separately byremoveRouterLayoutContent(HasElement)
which by default simply removes the old content.- Parameters:
content
- the content component ornull
if the layout content is to be cleared.
-
removeRouterLayoutContent
default void removeRouterLayoutContent(HasElement oldContent)
Removes content that should no longer be shown in this router layout. IfshowRouterLayoutContent(HasElement)
was previously called with a non-null parameter, then this method will be called with the same parameter immediately before callingshowRouterLayoutContent(HasElement)
again.By default, the old content is removed from its parent using
Element.removeFromParent()
.- Parameters:
oldContent
- the old content to remove, notnull
-
-