javax.swing.plaf
public class ColorUIResource extends Color implements UIResource
UIResource
, which indicates that
the color has been installed by a pluggable LookAndFeel. Such colors
are replaced when the LookAndFeel changes.
Constructor Summary | |
---|---|
ColorUIResource(int r, int g, int b)
Constructs a ColorUIResource using the specified
red, green, and blue values, which must be given as integers in
the range of 0-255. | |
ColorUIResource(int rgb)
Constructs a ColorUIResource using the specified
RGB value. | |
ColorUIResource(float r, float g, float b)
Constructs a ColorUIResource using the specified
red, green, and blue intensities, which must be given as floats in
the range of 0-1. | |
ColorUIResource(Color c)
Constructs a ColorUIResource , using the intensities
of another color.
|
ColorUIResource
using the specified
red, green, and blue values, which must be given as integers in
the range of 0-255. The alpha channel value will default to 255,
meaning that the color is fully opaque.
Parameters: r the red intensity, which must be in the range [0 .. 255]. g the green intensity, which must be in the range [0 .. 255]. b the blue intensity, which must be in the range [0 .. 255].
Throws: IllegalArgumentException if any of the values is outside the specified range.
ColorUIResource
using the specified
RGB value. The blue value is in bits 0-7, green in bits 8-15, and
red in bits 16-23. The other bits are ignored. The alpha value is set
to 255, meaning that the color is fully opaque.
Parameters: rgb the rgb value, as discussed above.
ColorUIResource
using the specified
red, green, and blue intensities, which must be given as floats in
the range of 0-1. The alpha channel value will default to 1.0f,
meaning that the color is fully opaque.
Parameters: r the red intensity, which must be in the range [0.0 .. 1.0]. g the green intensity, which must be in the range [0.0 .. 1.0]. b the blue intensity, which must be in the range [0.0 .. 1.0].
Throws: IllegalArgumentException if any of the values is outside the specified range.
ColorUIResource
, using the intensities
of another color.
Parameters: c the color whose intensities will be considered when
constructing this ColorUIResource
(null
not permitted).
Throws: NullPointerException if c
is null
.