Class LinkHighlight


  • public class LinkHighlight
    extends AbstractHighlight
    Denotes the highlighting to be applied to a link. LinkHighlight.Flavor is a closed set of NO-, PRIMARY-, or SECONDARY- highlighting. Mod is an open ended set of additional modifications (CSS classes) that may also be applied. Note that MOD_OPTICAL and MOD_ANIMATED are pre-defined mods. Label text may be set, which will also be displayed on the link.
    • Field Detail

      • MOD_OPTICAL

        public static final Mod MOD_OPTICAL
        Denotes a link to be tagged as an optical link.
      • MOD_ANIMATED

        public static final Mod MOD_ANIMATED
        Denotes a link to be tagged with animated traffic ("marching ants").
    • Constructor Detail

      • LinkHighlight

        public LinkHighlight​(java.lang.String linkId,
                             LinkHighlight.Flavor flavor)
        Constructs a link highlight entity.
        Parameters:
        linkId - the link identifier
        flavor - the highlight flavor
    • Method Detail

      • addMod

        public LinkHighlight addMod​(Mod mod)
        Adds a highlighting modification to this link highlight.
        Parameters:
        mod - mod to be added
        Returns:
        self, for chaining
      • setLabel

        public LinkHighlight setLabel​(java.lang.String label)
        Adds a label to be displayed on the link.
        Parameters:
        label - the label text
        Returns:
        self, for chaining
      • flavor

        public LinkHighlight.Flavor flavor()
        Returns the highlight flavor.
        Returns:
        highlight flavor
      • mods

        public java.util.Set<Mod> mods()
        Returns the highlight modifications.
        Returns:
        highlight modifications
      • cssClasses

        public java.lang.String cssClasses()
        Generates the CSS classes string from the flavor and any optional mods.
        Returns:
        CSS classes string
      • label

        public java.lang.String label()
        Returns the label text.
        Returns:
        label text