Package com.vaadin.flow.router
Class HighlightConditions
java.lang.Object
com.vaadin.flow.router.HighlightConditions
A set of predefined
HighlightCondition
s.- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic <C extends HasElement>
HighlightCondition<C>always()
Always highlight.static HighlightCondition<RouterLink>
Highlight if the navigation path starts with the targetRouterLink
path.static <C extends HasElement>
HighlightCondition<C>locationPrefix
(String prefix) Highlight if the navigation path starts withprefix
.static <C extends HasElement>
HighlightCondition<C>never()
Never highlight.static HighlightCondition<RouterLink>
Highlight if the navigation path is the same as the targetRouterLink
.
-
Method Details
-
sameLocation
Highlight if the navigation path is the same as the targetRouterLink
.- Returns:
- the highlight condition
-
locationPrefix
Highlight if the navigation path starts with the targetRouterLink
path.- Returns:
- the highlight condition
-
locationPrefix
Highlight if the navigation path starts withprefix
.- Type Parameters:
C
- the target type- Parameters:
prefix
- the prefix to match on the location path- Returns:
- the highlight condition
-
always
Always highlight.- Type Parameters:
C
- the target type- Returns:
- an always true highlight condition
-
never
Never highlight.- Type Parameters:
C
- the target type- Returns:
- an always false highlight condition
-