Class HighlightConditions

java.lang.Object
com.vaadin.flow.router.HighlightConditions

public final class HighlightConditions extends Object
A set of predefined HighlightConditions.
Since:
1.0
  • Method Details

    • 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 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