public final class NodeBadge
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
NodeBadge.Status
Designates the badge status.
|
Modifier and Type | Method and Description |
---|---|
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.
|
static NodeBadge |
glyph(java.lang.String gid)
Returns a glyph badge, with default status.
|
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(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.
|
static NodeBadge |
text(java.lang.String txt)
Returns an arbitrary text badge, with default status.
|
java.lang.String |
toString() |
public java.lang.String toString()
toString
in class java.lang.Object
public NodeBadge.Status status()
public boolean isGlyph()
public java.lang.String text()
isGlyph
is true, the text is a glyph ID, otherwise
the text is displayed verbatim in the badge.public java.lang.String message()
public static NodeBadge text(java.lang.String txt)
txt
- the textpublic static NodeBadge glyph(java.lang.String gid)
gid
- the glyph IDpublic static NodeBadge number(int n)
n
- the numberpublic static NodeBadge text(NodeBadge.Status s, java.lang.String txt)
s
- the statustxt
- the textpublic static NodeBadge glyph(NodeBadge.Status s, java.lang.String gid)
s
- the statusgid
- the glyph IDpublic static NodeBadge number(NodeBadge.Status s, int n)
s
- the statusn
- the numberpublic static NodeBadge text(NodeBadge.Status s, java.lang.String txt, java.lang.String msg)
s
- the statustxt
- the textmsg
- the optional messagepublic static NodeBadge glyph(NodeBadge.Status s, java.lang.String gid, java.lang.String msg)
s
- the statusgid
- the glyph IDmsg
- the optional messagepublic static NodeBadge number(NodeBadge.Status s, int n, java.lang.String msg)
s
- the statusn
- the numbermsg
- the optional message