Class HTMLColorSliderModel
- java.lang.Object
-
- org.pushingpixels.substance.internal.contrib.randelshofer.quaqua.colorchooser.ColorSliderModel
-
- org.pushingpixels.substance.internal.contrib.randelshofer.quaqua.colorchooser.RGBColorSliderModel
-
- org.pushingpixels.substance.internal.contrib.randelshofer.quaqua.colorchooser.HTMLColorSliderModel
-
public class HTMLColorSliderModel extends RGBColorSliderModel
ColorSliderModel for the HTML color model (red, green, blue, restricted to values considered as web-save).
-
-
Field Summary
-
Fields inherited from class org.pushingpixels.substance.internal.contrib.randelshofer.quaqua.colorchooser.ColorSliderModel
components, values
-
-
Constructor Summary
Constructors Constructor Description HTMLColorSliderModel()
Creates a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getInterpolatedRGB(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.int
getRGB()
protected int
getRGB(int r, int g, int b)
static boolean
isWebSave(int rgb)
boolean
isWebSaveOnly()
void
setRGB(int rgb)
void
setWebSaveOnly(boolean b)
int
toRGB(int[] values)
static int
toWebSave(int rgb)
-
Methods inherited from class org.pushingpixels.substance.internal.contrib.randelshofer.quaqua.colorchooser.ColorSliderModel
addChangeListener, addColorSlider, configureColorSlider, fireColorChanged, fireStateChanged, getBoundedRangeModel, getColor, getComponentCount, getValue, removeChangeListener, removeColorSlider, setColor, setValue, unconfigureColorSlider
-
-
-
-
Method Detail
-
getRGB
public int getRGB()
- Overrides:
getRGB
in classRGBColorSliderModel
-
getInterpolatedRGB
public int getInterpolatedRGB(int component, float value)
Description copied from class:ColorSliderModel
Returns 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:
getInterpolatedRGB
in classColorSliderModel
-
getRGB
protected int getRGB(int r, int g, int b)
- Overrides:
getRGB
in classRGBColorSliderModel
-
setRGB
public void setRGB(int rgb)
- Overrides:
setRGB
in classRGBColorSliderModel
-
toRGB
public int toRGB(int[] values)
- Overrides:
toRGB
in 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)
-
-