Package com.vaadin.flow.router
Class HighlightConditions
- java.lang.Object
-
- com.vaadin.flow.router.HighlightConditions
-
public final class HighlightConditions extends Object
A set of predefinedHighlightCondition
s.- Since:
- 1.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <C extends HasElement>
HighlightCondition<C>always()
Always highlight.static HighlightCondition<RouterLink>
locationPrefix()
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>
sameLocation()
Highlight if the navigation path is the same as the targetRouterLink
.
-
-
-
Method Detail
-
sameLocation
public static HighlightCondition<RouterLink> sameLocation()
Highlight if the navigation path is the same as the targetRouterLink
.- Returns:
- the highlight condition
-
locationPrefix
public static HighlightCondition<RouterLink> locationPrefix()
Highlight if the navigation path starts with the targetRouterLink
path.- Returns:
- the highlight condition
-
locationPrefix
public static <C extends HasElement> HighlightCondition<C> locationPrefix(String prefix)
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
public static <C extends HasElement> HighlightCondition<C> always()
Always highlight.- Type Parameters:
C
- the target type- Returns:
- an always true highlight condition
-
never
public static <C extends HasElement> HighlightCondition<C> never()
Never highlight.- Type Parameters:
C
- the target type- Returns:
- an always false highlight condition
-
-