Class NodeBadge


  • public final class NodeBadge
    extends java.lang.Object
    Designates a badge to be applied to a node in the topology view.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  NodeBadge.Status
      Designates the badge status.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static NodeBadge glyph​(java.lang.String gid)
      Returns a glyph badge, with default status.
      static NodeBadge glyph​(NodeBadge.Status s, java.lang.String gid)
      Returns a glyph badge, with the given status.
      static NodeBadge glyph​(NodeBadge.Status s, java.lang.String gid, java.lang.String msg)
      Returns a glyph badge, with the given status and optional message.
      boolean isGlyph()
      Returns true if the text for this badge designates a glyph ID.
      java.lang.String message()
      Returns the message associated with the badge.
      static NodeBadge number​(int n)
      Returns a numeric badge, with default status.
      static NodeBadge number​(NodeBadge.Status s, int n)
      Returns a numeric badge, with the given status and optional message.
      static NodeBadge number​(NodeBadge.Status s, int n, java.lang.String msg)
      Returns a numeric badge, with the given status and optional message.
      NodeBadge.Status status()
      Returns the badge status.
      java.lang.String text()
      Returns the text for the badge.
      static NodeBadge text​(java.lang.String txt)
      Returns an arbitrary text badge, with default status.
      static NodeBadge text​(NodeBadge.Status s, java.lang.String txt)
      Returns an arbitrary text badge, with the given status.
      static NodeBadge text​(NodeBadge.Status s, java.lang.String txt, java.lang.String msg)
      Returns an arbitrary text badge, with the given status and optional message.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • status

        public NodeBadge.Status status()
        Returns the badge status.
        Returns:
        badge status
      • isGlyph

        public boolean isGlyph()
        Returns true if the text for this badge designates a glyph ID.
        Returns:
        true if badge uses glyph
      • text

        public java.lang.String text()
        Returns the text for the badge. Note that if isGlyph is true, the text is a glyph ID, otherwise the text is displayed verbatim in the badge.
        Returns:
        text for badge
      • message

        public java.lang.String message()
        Returns the message associated with the badge.
        Returns:
        associated message
      • text

        public static NodeBadge text​(java.lang.String txt)
        Returns an arbitrary text badge, with default status.
        Parameters:
        txt - the text
        Returns:
        node badge to display text
      • glyph

        public static NodeBadge glyph​(java.lang.String gid)
        Returns a glyph badge, with default status.
        Parameters:
        gid - the glyph ID
        Returns:
        node badge to display glyph
      • number

        public static NodeBadge number​(int n)
        Returns a numeric badge, with default status.
        Parameters:
        n - the number
        Returns:
        node badge to display a number
      • text

        public static NodeBadge text​(NodeBadge.Status s,
                                     java.lang.String txt)
        Returns an arbitrary text badge, with the given status.
        Parameters:
        s - the status
        txt - the text
        Returns:
        node badge to display text
      • glyph

        public static NodeBadge glyph​(NodeBadge.Status s,
                                      java.lang.String gid)
        Returns a glyph badge, with the given status.
        Parameters:
        s - the status
        gid - the glyph ID
        Returns:
        node badge to display glyph
      • number

        public static NodeBadge number​(NodeBadge.Status s,
                                       int n)
        Returns a numeric badge, with the given status and optional message.
        Parameters:
        s - the status
        n - the number
        Returns:
        node badge to display a number
      • text

        public static NodeBadge text​(NodeBadge.Status s,
                                     java.lang.String txt,
                                     java.lang.String msg)
        Returns an arbitrary text badge, with the given status and optional message.
        Parameters:
        s - the status
        txt - the text
        msg - the optional message
        Returns:
        node badge to display text
      • glyph

        public static NodeBadge glyph​(NodeBadge.Status s,
                                      java.lang.String gid,
                                      java.lang.String msg)
        Returns a glyph badge, with the given status and optional message.
        Parameters:
        s - the status
        gid - the glyph ID
        msg - the optional message
        Returns:
        node badge to display glyph
      • number

        public static NodeBadge number​(NodeBadge.Status s,
                                       int n,
                                       java.lang.String msg)
        Returns a numeric badge, with the given status and optional message.
        Parameters:
        s - the status
        n - the number
        msg - the optional message
        Returns:
        node badge to display a number