Package hudson.model
Enum Class BallColor
- All Implemented Interfaces:
StatusIcon
,Serializable
,Comparable<BallColor>
,Constable
Ball color used for the build status indication.
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.
Historical Note
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 JENKINS-956.
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionanime()
Gets the animated version.Gets the RGB color of this color.Gets the human-readable description used as img/@alt.Returns thegetBaseColor()
in the "#RRGGBB" format.Get the status ball icon class spec name.Get the status ball icon name.getImage()
String like "red.png" that represents the file name of the image.getImageOf
(String size) Returns the URL to the image.boolean
True if the icon is animated.noAnime()
Gets the unanimated version.toString()
Also used as a final name.static BallColor
Returns the enum constant of this class with the specified name.static BallColor[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
RED
-
RED_ANIME
-
YELLOW
-
YELLOW_ANIME
-
BLUE
-
BLUE_ANIME
-
GREY
-
GREY_ANIME
-
DISABLED
-
DISABLED_ANIME
-
ABORTED
-
ABORTED_ANIME
-
NOTBUILT
-
NOTBUILT_ANIME
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getIconName
Get the status ball icon name.- Returns:
- The status ball icon name.
-
getIconClassName
Get the status ball icon class spec name.- Returns:
- The status ball icon class spec name.
-
getImage
String like "red.png" that represents the file name of the image. -
getImageOf
Description copied from interface:StatusIcon
Returns the URL to the image.- Specified by:
getImageOf
in interfaceStatusIcon
- Parameters:
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.)- Returns:
- The URL is rendered as is in the img @src attribute, so it must contain the context path, etc.
-
getDescription
Gets the human-readable description used as img/@alt.- Specified by:
getDescription
in interfaceStatusIcon
-
getBaseColor
Gets the RGB color of this color. Animation effect is not reflected to this value. -
getHtmlBaseColor
Returns thegetBaseColor()
in the "#RRGGBB" format. -
toString
Also used as a final name. -
anime
Gets the animated version. -
noAnime
Gets the unanimated version. -
isAnimated
public boolean isAnimated()True if the icon is animated.
-