Class Highlights


  • public class Highlights
    extends java.lang.Object
    Encapsulates highlights to be applied to the topology view, such as highlighting links, displaying link labels, perhaps even decorating nodes with badges, etc.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Highlights.Amount
      A notion of amount.
    • Constructor Summary

      Constructors 
      Constructor Description
      Highlights()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Highlights add​(DeviceHighlight dh)
      Adds highlighting information for a device.
      Highlights add​(HostHighlight hh)
      Adds highlighting information for a host.
      Highlights add​(LinkHighlight lh)
      Adds highlighting information for a link.
      Highlights delay​(int ms)
      Sets the number of milliseconds to delay processing of highlights events on the client side.
      int delayMs()
      Return the delay for the highlight event.
      java.util.Collection<DeviceHighlight> devices()
      Returns the collection of device highlights.
      DeviceHighlight getDevice​(java.lang.String id)
      Returns the device highlight for the given device identifier, or null if no match.
      HostHighlight getHost​(java.lang.String id)
      Returns the host highlight for the given host identifier, or null if no match.
      LinkHighlight getLink​(java.lang.String id)
      Returns the link highlight for the given link identifier, or null if no match.
      NodeHighlight getNode​(java.lang.String id)
      Returns the node highlight (device or host) for the given element identifier, or null if no match.
      java.util.Collection<HostHighlight> hosts()
      Returns the collection of host highlights.
      java.util.Collection<LinkHighlight> links()
      Returns the collection of link highlights.
      Highlights subdueAllElse​(Highlights.Amount amount)
      Marks the amount by which all other elements (devices, hosts, links) not explicitly referenced here will be "subdued" visually.
      Highlights.Amount subdueLevel()
      Returns the amount by which all other elements not explicitly referenced here should be "subdued".
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Highlights

        public Highlights()
    • Method Detail

      • delay

        public Highlights delay​(int ms)
        Sets the number of milliseconds to delay processing of highlights events on the client side.
        Parameters:
        ms - milliseconds to delay
        Returns:
        self, for chaining
      • delayMs

        public int delayMs()
        Return the delay for the highlight event.
        Returns:
        delay in milliseconds
      • add

        public Highlights add​(DeviceHighlight dh)
        Adds highlighting information for a device.
        Parameters:
        dh - device highlight
        Returns:
        self, for chaining
      • add

        public Highlights add​(HostHighlight hh)
        Adds highlighting information for a host.
        Parameters:
        hh - host highlight
        Returns:
        self, for chaining
      • add

        public Highlights add​(LinkHighlight lh)
        Adds highlighting information for a link.
        Parameters:
        lh - link highlight
        Returns:
        self, for chaining
      • subdueAllElse

        public Highlights subdueAllElse​(Highlights.Amount amount)
        Marks the amount by which all other elements (devices, hosts, links) not explicitly referenced here will be "subdued" visually.
        Parameters:
        amount - amount to subdue other elements
        Returns:
        self, for chaining
      • devices

        public java.util.Collection<DeviceHighlight> devices()
        Returns the collection of device highlights.
        Returns:
        device highlights
      • hosts

        public java.util.Collection<HostHighlight> hosts()
        Returns the collection of host highlights.
        Returns:
        host highlights
      • links

        public java.util.Collection<LinkHighlight> links()
        Returns the collection of link highlights.
        Returns:
        link highlights
      • subdueLevel

        public Highlights.Amount subdueLevel()
        Returns the amount by which all other elements not explicitly referenced here should be "subdued".
        Returns:
        amount to subdue other elements
      • getNode

        public NodeHighlight getNode​(java.lang.String id)
        Returns the node highlight (device or host) for the given element identifier, or null if no match.
        Parameters:
        id - element identifier
        Returns:
        corresponding node highlight
      • getDevice

        public DeviceHighlight getDevice​(java.lang.String id)
        Returns the device highlight for the given device identifier, or null if no match.
        Parameters:
        id - device identifier
        Returns:
        corresponding device highlight
      • getHost

        public HostHighlight getHost​(java.lang.String id)
        Returns the host highlight for the given host identifier, or null if no match.
        Parameters:
        id - host identifier
        Returns:
        corresponding host highlight
      • getLink

        public LinkHighlight getLink​(java.lang.String id)
        Returns the link highlight for the given link identifier, or null if no match.
        Parameters:
        id - link identifier
        Returns:
        corresponding link highlight