Package org.htmlunit.cssparser.dom
Class HSLColorImpl
- java.lang.Object
-
- org.htmlunit.cssparser.dom.HSLColorImpl
-
- All Implemented Interfaces:
java.io.Serializable
public class HSLColorImpl extends java.lang.Object implements java.io.Serializable
Implementation of HSLColor.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private CSSValueImpl
alpha_
private boolean
commaSeparated_
private java.lang.String
function_
private CSSValueImpl
hue_
private CSSValueImpl
lightness_
private CSSValueImpl
saturation_
-
Constructor Summary
Constructors Constructor Description HSLColorImpl(java.lang.String function, LexicalUnit lu)
Constructor that reads the values from the given chain of LexicalUnits.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CSSValueImpl
getAlpha()
CSSValueImpl
getHue()
CSSValueImpl
getLightness()
CSSValueImpl
getSaturation()
void
setAlpha(CSSValueImpl alpha)
Sets the alpha part to a new value.void
setHue(CSSValueImpl hue)
Sets the hue part to a new value.void
setLightness(CSSValueImpl lightness)
Sets the lightness part to a new value.void
setSaturation(CSSValueImpl saturation)
Sets the saturation part to a new value.java.lang.String
toString()
-
-
-
Field Detail
-
function_
private final java.lang.String function_
-
hue_
private CSSValueImpl hue_
-
saturation_
private CSSValueImpl saturation_
-
lightness_
private CSSValueImpl lightness_
-
alpha_
private CSSValueImpl alpha_
-
commaSeparated_
private final boolean commaSeparated_
-
-
Constructor Detail
-
HSLColorImpl
public HSLColorImpl(java.lang.String function, LexicalUnit lu) throws org.w3c.dom.DOMException
Constructor that reads the values from the given chain of LexicalUnits.- Parameters:
function
- the name of the function; hsl or hslalu
- the values- Throws:
org.w3c.dom.DOMException
- in case of error
-
-
Method Detail
-
getHue
public CSSValueImpl getHue()
- Returns:
- the hue part.
-
setHue
public void setHue(CSSValueImpl hue)
Sets the hue part to a new value.- Parameters:
hue
- the new CSSPrimitiveValue
-
getSaturation
public CSSValueImpl getSaturation()
- Returns:
- the saturation part.
-
setSaturation
public void setSaturation(CSSValueImpl saturation)
Sets the saturation part to a new value.- Parameters:
saturation
- the new CSSPrimitiveValue
-
getLightness
public CSSValueImpl getLightness()
- Returns:
- the lightness part.
-
setLightness
public void setLightness(CSSValueImpl lightness)
Sets the lightness part to a new value.- Parameters:
lightness
- the new CSSPrimitiveValue
-
getAlpha
public CSSValueImpl getAlpha()
- Returns:
- the alpha part.
-
setAlpha
public void setAlpha(CSSValueImpl alpha)
Sets the alpha part to a new value.- Parameters:
alpha
- the new CSSPrimitiveValue
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-