com.vaadin.flow.component.applayout.
Class AbstractAppRouterLayout
- java.lang.Object
-
- com.vaadin.flow.component.applayout.AbstractAppRouterLayout
-
All Implemented Interfaces:
public abstract class AbstractAppRouterLayout extends Object implements RouterLayout
Convenience class for using an AppLayout as a parent layout in a Flow application. Basic usage involves extending this class and implementing the
configure
method.
-
-
Constructor Summary
Constructors Modifier Constructor and Description protected
AbstractAppRouterLayout()
-
Method Summary
All Methods Modifier and Type Method and Description protected void
afterNavigate(String route, HasElement content)
This hook is called after a navigation is made into a route which has this router layout as its parent layout.
protected void
beforeNavigate(String route, HasElement content)
This hook is called before a navigation is being made into a route which has this router layout as its parent layout.
protected abstract void
configure(AppLayout appLayout, AppLayoutMenu appLayoutMenu)
This hook is called when this router layout is being constructed and provides an opportunity to configure the AppLayout in use.
AppLayout
getAppLayout()
AppLayoutMenu
getAppLayoutMenu()
Element
getElement()
Gets the element associated with this instance.
void
showRouterLayoutContent(HasElement content)
Shows the content of the layout which is the router target component annotated with a
@Route
.
-
-
-
Method Detail
-
configure
protected abstract void configure(AppLayout appLayout, AppLayoutMenu appLayoutMenu)
This hook is called when this router layout is being constructed and provides an opportunity to configure the AppLayout in use.
Parameters:
appLayout
-AppLayout
parent layoutappLayoutMenu
-AppLayoutMenu
to configure.
-
beforeNavigate
protected void beforeNavigate(String route, HasElement content)
This hook is called before a navigation is being made into a route which has this router layout as its parent layout.
Parameters:
route
- route that is being navigated tocontent
-HasElement
the content component being added
-
afterNavigate
protected void afterNavigate(String route, HasElement content)
This hook is called after a navigation is made into a route which has this router layout as its parent layout.
Parameters:
route
- route navigated tocontent
-HasElement
the content component added
-
showRouterLayoutContent
public void showRouterLayoutContent(HasElement content)
Description copied from interface:
RouterLayout
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, becauseRouter
automatically removes it before calling the method.Specified by:
showRouterLayoutContent
in interfaceRouterLayout
Parameters:
content
- the content component ornull
if the layout content is to be cleared.
-
getElement
public Element getElement()
Description copied from interface:
HasElement
Gets the element associated with this instance.
Specified by:
getElement
in interfaceHasElement
Returns:
the element associated with this instance
-
getAppLayoutMenu
public AppLayoutMenu getAppLayoutMenu()
Returns:
AppLayoutMenu
which will be updated on navigation.
-
-