public enum BallColor extends Enum<BallColor> implements StatusIcon
There are four basic colors, plus their animated "bouncy" versions.
Enum.ordinal()
is the sort order.
Note that multiple BallColor
instances may map to the same
RGB color, to avoid the rainbow effect.
Hudson started to overload colors — for example grey could mean
either disabled, aborted, or not yet built. As a result, BallColor
becomes more like a "logical" color, in the sense that different BallColor
values can map to the same RGB color. See issue #956.
Enum Constant and Description |
---|
ABORTED |
ABORTED_ANIME |
BLUE |
BLUE_ANIME |
DISABLED |
DISABLED_ANIME |
GREY |
GREY_ANIME |
NOTBUILT |
NOTBUILT_ANIME |
RED |
RED_ANIME |
YELLOW |
YELLOW_ANIME |
Modifier and Type | Method and Description |
---|---|
BallColor |
anime()
Gets the animated version.
|
Color |
getBaseColor()
Gets the RGB color of this color.
|
String |
getDescription()
Gets the human-readable description used as img/@alt.
|
String |
getHtmlBaseColor()
Returns the
getBaseColor() in the "#RRGGBB" format. |
String |
getIconClassName()
Get the status ball icon class spec name.
|
String |
getIconName()
Get the status ball icon name.
|
String |
getImage()
String like "red.png" that represents the file name of the image.
|
String |
getImageOf(String size)
Returns the URL to the image.
|
boolean |
isAnimated()
True if the icon is animated.
|
BallColor |
noAnime()
Gets the unanimated version.
|
String |
toString()
Also used as a final name.
|
static BallColor |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BallColor[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BallColor RED
public static final BallColor RED_ANIME
public static final BallColor YELLOW
public static final BallColor YELLOW_ANIME
public static final BallColor BLUE
public static final BallColor BLUE_ANIME
public static final BallColor GREY
public static final BallColor GREY_ANIME
public static final BallColor DISABLED
public static final BallColor DISABLED_ANIME
public static final BallColor ABORTED
public static final BallColor ABORTED_ANIME
public static final BallColor NOTBUILT
public static final BallColor NOTBUILT_ANIME
public static BallColor[] values()
for (BallColor c : BallColor.values()) System.out.println(c);
public static BallColor valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getIconName()
public String getIconClassName()
public String getImage()
public String getImageOf(String size)
StatusIcon
getImageOf
in interface StatusIcon
size
- The size specified. Must support "16x16", "24x24", and "32x32" at least.
For forward compatibility, if you receive a size that's not supported,
consider returning your biggest icon (and let the browser rescale.)public String getDescription()
getDescription
in interface StatusIcon
public Color getBaseColor()
public String getHtmlBaseColor()
getBaseColor()
in the "#RRGGBB" format.public String toString()
public BallColor anime()
public BallColor noAnime()
public boolean isAnimated()
Copyright © 2004–2021. All rights reserved.