public class LinkHighlight extends AbstractHighlight
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.Modifier and Type | Class and Description |
---|---|
static class |
LinkHighlight.Flavor
Link highlighting flavor.
|
Modifier and Type | Field and Description |
---|---|
static Mod |
MOD_ANIMATED
Denotes a link to be tagged with animated traffic ("marching ants").
|
static Mod |
MOD_OPTICAL
Denotes a link to be tagged as an optical link.
|
Constructor and Description |
---|
LinkHighlight(java.lang.String linkId,
LinkHighlight.Flavor flavor)
Constructs a link highlight entity.
|
Modifier and Type | Method and Description |
---|---|
LinkHighlight |
addMod(Mod mod)
Adds a highlighting modification to this link highlight.
|
java.lang.String |
cssClasses()
|
LinkHighlight.Flavor |
flavor()
Returns the highlight flavor.
|
java.lang.String |
label()
Returns the label text.
|
java.util.Set<Mod> |
mods()
Returns the highlight modifications.
|
LinkHighlight |
setLabel(java.lang.String label)
Adds a label to be displayed on the link.
|
elementId, keepSubdued, subdued, type
public static final Mod MOD_OPTICAL
public static final Mod MOD_ANIMATED
public LinkHighlight(java.lang.String linkId, LinkHighlight.Flavor flavor)
linkId
- the link identifierflavor
- the highlight flavorpublic LinkHighlight addMod(Mod mod)
mod
- mod to be addedpublic LinkHighlight setLabel(java.lang.String label)
label
- the label textpublic LinkHighlight.Flavor flavor()
public java.util.Set<Mod> mods()
public java.lang.String cssClasses()
public java.lang.String label()