Class HTMLColorSliderModel
java.lang.Object
org.pushingpixels.radiance.theming.internal.contrib.randelshofer.quaqua.colorchooser.ColorSliderModel
org.pushingpixels.radiance.theming.internal.contrib.randelshofer.quaqua.colorchooser.RGBColorSliderModel
org.pushingpixels.radiance.theming.internal.contrib.randelshofer.quaqua.colorchooser.HTMLColorSliderModel
ColorSliderModel for the HTML color model (red, green, blue, restricted
to values considered as web-save).
- Version:
- 1.0.1 2005-08-28 Method toWebSave generates now ARGB value instead
of just an RGB value. Method isWebSave ignores the alpha channel of a color.
1.0 May 22, 2005 Created.
-
Field Summary
FieldsFields inherited from class ColorSliderModel
components, values -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetInterpolatedRGB(int component, float value) Returns an interpolated RGB value by using the values of the color components of this ColorSliderModel except for the component specified as an argument.intgetRGB()protected intgetRGB(int r, int g, int b) static booleanisWebSave(int rgb) booleanvoidsetRGB(int rgb) voidsetWebSaveOnly(boolean b) inttoRGB(int[] values) static inttoWebSave(int rgb)
-
Field Details
-
isWebSaveOnly
private boolean isWebSaveOnly
-
-
Constructor Details
-
HTMLColorSliderModel
public HTMLColorSliderModel()Creates a new instance.
-
-
Method Details
-
getRGB
public int getRGB()- Overrides:
getRGBin classRGBColorSliderModel
-
getInterpolatedRGB
public int getInterpolatedRGB(int component, float value) Description copied from class:ColorSliderModelReturns an interpolated RGB value by using the values of the color components of this ColorSliderModel except for the component specified as an argument. For this component the ratio between zero and the maximum of its BoundedRangeModel is used.- Overrides:
getInterpolatedRGBin classColorSliderModel
-
getRGB
protected int getRGB(int r, int g, int b) - Overrides:
getRGBin classRGBColorSliderModel
-
setRGB
public void setRGB(int rgb) - Overrides:
setRGBin classRGBColorSliderModel
-
toRGB
public int toRGB(int[] values) - Overrides:
toRGBin classRGBColorSliderModel
-
setWebSaveOnly
public void setWebSaveOnly(boolean b) -
isWebSaveOnly
public boolean isWebSaveOnly() -
isWebSave
public static boolean isWebSave(int rgb) -
toWebSave
public static int toWebSave(int rgb)
-