Class NodeBadge


  • public final class NodeBadge
    extends Object
    Designates a badge to be applied to a node in the topology view.
    • Method Detail

      • 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 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 String message()
        Returns the message associated with the badge.
        Returns:
        associated message
      • text

        public static NodeBadge text​(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​(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,
                                     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,
                                      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,
                                     String txt,
                                     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,
                                      String gid,
                                      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,
                                       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