com.vaadin.flow.router.
Class HighlightConditions
- java.lang.Object
-
- com.vaadin.flow.router.HighlightConditions
-
public final class HighlightConditions extends Object
A set of predefined
HighlightCondition
s.Since:
1.0
-
-
Method Summary
All 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 target
RouterLink
path.static <C extends HasElement>
HighlightCondition<C>locationPrefix(String prefix)
Highlight if the navigation path starts with
prefix
.static <C extends HasElement>
HighlightCondition<C>never()
Never highlight.
static HighlightCondition<RouterLink>
sameLocation()
Highlight if the navigation path is the same as the target
RouterLink
.
-
-
-
Method Detail
-
sameLocation
public static HighlightCondition<RouterLink> sameLocation()
Highlight if the navigation path is the same as the target
RouterLink
.Returns:
the highlight condition
-
locationPrefix
public static HighlightCondition<RouterLink> locationPrefix()
Highlight if the navigation path starts with the target
RouterLink
path.Returns:
the highlight condition
-
locationPrefix
public static <C extends HasElement> HighlightCondition<C> locationPrefix(String prefix)
Highlight if the navigation path starts with
prefix
.Type Parameters:
C
- the target typeParameters:
prefix
- the prefix to match on the location pathReturns:
the highlight condition
-
always
public static <C extends HasElement> HighlightCondition<C> always()
Always highlight.
Type Parameters:
C
- the target typeReturns:
an always true highlight condition
-
never
public static <C extends HasElement> HighlightCondition<C> never()
Never highlight.
Type Parameters:
C
- the target typeReturns:
an always false highlight condition
-
-