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