Package org.onosproject.ui.topo
Class LinkHighlight
- java.lang.Object
-
- org.onosproject.ui.topo.AbstractHighlight
-
- org.onosproject.ui.topo.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 thatMOD_OPTICAL
andMOD_ANIMATED
are pre-defined mods. Label text may be set, which will also be displayed on the link.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LinkHighlight.Flavor
Link highlighting flavor.
-
Field Summary
Fields Modifier and Type Field 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 Summary
Constructors Constructor Description LinkHighlight(java.lang.String linkId, LinkHighlight.Flavor flavor)
Constructs a link highlight entity.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.-
Methods inherited from class org.onosproject.ui.topo.AbstractHighlight
elementId, keepSubdued, subdued, type
-
-
-
-
Constructor Detail
-
LinkHighlight
public LinkHighlight(java.lang.String linkId, LinkHighlight.Flavor flavor)
Constructs a link highlight entity.- Parameters:
linkId
- the link identifierflavor
- 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()
- Returns:
- CSS classes string
-
label
public java.lang.String label()
Returns the label text.- Returns:
- label text
-
-