Package de.xima.fc.workflow.taglib.model
Class ClientOpaqueColor
- java.lang.Object
-
- de.xima.fc.workflow.taglib.model.ClientOpaqueColor
-
- All Implemented Interfaces:
Serializable
public final class ClientOpaqueColor extends Object implements Serializable
Represents an opaque (=no transparency) color for a node or trigger.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ClientOpaqueColor()
Deprecated.Use that static methods, this is required for JSON de/serialization.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getBlue()
int
getGreen()
int
getRed()
static ClientOpaqueColor
gray(int amount)
static ClientOpaqueColor
of(RgbTriplet rgbTriplet)
Converts anRgbTriplet
to aClientOpaqueColor
.static ClientOpaqueColor
of(IGuiColor guiColor)
Converts aIGuiColor
to aClientOpaqueColor
.static ClientOpaqueColor
ofRgb(int rgb)
static ClientOpaqueColor
ofRgb(int red, int green, int blue)
void
setBlue(int blue)
void
setGreen(int green)
void
setRed(int red)
-
-
-
Constructor Detail
-
ClientOpaqueColor
@Deprecated public ClientOpaqueColor()
Deprecated.Use that static methods, this is required for JSON de/serialization.
-
-
Method Detail
-
getBlue
@Nonnull public int getBlue()
- Returns:
- The blue channel of the color, in the range [0,255].
-
getGreen
@Nonnull public int getGreen()
- Returns:
- The green channel of the color, in the range [0,255].
-
getRed
@Nonnull public int getRed()
- Returns:
- The red channel of the color, in the range [0,255].
-
setBlue
public void setBlue(int blue)
- Parameters:
blue
- The blue channel of the color, in the range [0,255].
-
setGreen
public void setGreen(int green)
- Parameters:
green
- The green channel of the color, in the range [0,255].
-
setRed
public void setRed(int red)
- Parameters:
red
- The red channel of the color, in the range [0,255].
-
of
public static ClientOpaqueColor of(IGuiColor guiColor)
- Parameters:
guiColor
- GUI color to convert.- Returns:
- The converted opaque color.
-
of
public static ClientOpaqueColor of(RgbTriplet rgbTriplet)
Converts anRgbTriplet
to aClientOpaqueColor
.- Parameters:
rgbTriplet
- RGB triplet to convert.- Returns:
- The converted opaque color.
-
gray
public static ClientOpaqueColor gray(int amount)
- Parameters:
amount
- The amount of gray, from0
(black) to255
(white).- Returns:
- A gray shade with the given amount.
-
ofRgb
public static ClientOpaqueColor ofRgb(int red, int green, int blue)
- Parameters:
red
- The red channel of the color, in the range [0,255].green
- The green channel of the color, in the range [0,255].blue
- The blue channel of the color, in the range [0,255].- Returns:
- A new color instance with the red, green, and blue channel.
-
ofRgb
public static ClientOpaqueColor ofRgb(int rgb)
- Parameters:
rgb
- Hexadecimal rgb value, e.g.0x40F3A2
.- Returns:
- A new color instance with the red, green, and blue channel.
-
-