APIdia Launch Partner
Top Constructors Methods
javax.swing.colorchooser

pack-priv final Class ColorModelHSL

extends ColorModel
Class Inheritance

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv int
pack-priv float
pack-priv static float

Returns:

the hue component
getHue
(float
the red component of the color
red
,
float
the green component of the color
green
,
float
the blue component of the color
blue
,
float
the larger of red, green and blue
max
,
float
the smaller of red, green and blue
min
)

Calculates the hue component for HSL and HSV color spaces.

pack-priv int
private static float[]

Returns:

a float array that contains RGB components
HSLtoRGB
(float[]
a float array with length equal to the number of HSL components
hsl
,
float[]
a float array with length of at least 3 that contains RGB components of a color
rgb
)

Converts HSL components of a color to a set of RGB components.

pack-priv static float

Returns:

the larger of red, green and blue
max
(float
the red component of the color
red
,
float
the green component of the color
green
,
float
the blue component of the color
blue
)

Returns the larger of three color components.

pack-priv static float

Returns:

the smaller of red, green and blue
min
(float
the red component of the color
red
,
float
the green component of the color
green
,
float
the blue component of the color
blue
)

Returns the smaller of three color components.

private static float
normalize(float q, float p, float color)

private static float[]

Returns:

a float array that contains HSL components
RGBtoHSL
(float[]
a float array with length of at least 3 that contains RGB components of a color
rgb
,
float[]
a float array with length equal to the number of HSL components
hsl
)

Converts RGB components of a color to a set of HSL components.

pack-priv void
setColor(int color, float[] space)

Overrides javax.swing.colorchooser.ColorModel.setColor.

Inherited from javax.swing.colorchooser.ColorModel:
getCountgetIntegergetLabelgetMinimumgetText

Constructor Detail

ColorModelHSLback to summary
pack-priv ColorModelHSL()

Method Detail

getColorback to summary
pack-priv int getColor(float[] space)

Overrides javax.swing.colorchooser.ColorModel.getColor.

Annotations
@Override
getDefaultback to summary
pack-priv float getDefault(int index)

Overrides javax.swing.colorchooser.ColorModel.getDefault.

Annotations
@Override
getHueback to summary
pack-priv static float getHue(float red, float green, float blue, float max, float min)

Calculates the hue component for HSL and HSV color spaces.

Parameters
red:float

the red component of the color

green:float

the green component of the color

blue:float

the blue component of the color

max:float

the larger of red, green and blue

min:float

the smaller of red, green and blue

Returns:float

the hue component

getMaximumback to summary
pack-priv int getMaximum(int index)

Overrides javax.swing.colorchooser.ColorModel.getMaximum.

Annotations
@Override
HSLtoRGBback to summary
private static float[] HSLtoRGB(float[] hsl, float[] rgb)

Converts HSL components of a color to a set of RGB components.

Parameters
hsl:float[]

a float array with length equal to the number of HSL components

rgb:float[]

a float array with length of at least 3 that contains RGB components of a color

Returns:float[]

a float array that contains RGB components

maxback to summary
pack-priv static float max(float red, float green, float blue)

Returns the larger of three color components.

Parameters
red:float

the red component of the color

green:float

the green component of the color

blue:float

the blue component of the color

Returns:float

the larger of red, green and blue

minback to summary
pack-priv static float min(float red, float green, float blue)

Returns the smaller of three color components.

Parameters
red:float

the red component of the color

green:float

the green component of the color

blue:float

the blue component of the color

Returns:float

the smaller of red, green and blue

normalizeback to summary
private static float normalize(float q, float p, float color)
RGBtoHSLback to summary
private static float[] RGBtoHSL(float[] rgb, float[] hsl)

Converts RGB components of a color to a set of HSL components.

Parameters
rgb:float[]

a float array with length of at least 3 that contains RGB components of a color

hsl:float[]

a float array with length equal to the number of HSL components

Returns:float[]

a float array that contains HSL components

setColorback to summary
pack-priv void setColor(int color, float[] space)

Overrides javax.swing.colorchooser.ColorModel.setColor.

Annotations
@Override