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.SerializableImplementation of HSLColor.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private CSSValueImplalpha_private booleancommaSeparated_private java.lang.Stringfunction_private CSSValueImplhue_private CSSValueImpllightness_private CSSValueImplsaturation_
-
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 CSSValueImplgetAlpha()CSSValueImplgetHue()CSSValueImplgetLightness()CSSValueImplgetSaturation()voidsetAlpha(CSSValueImpl alpha)Sets the alpha part to a new value.voidsetHue(CSSValueImpl hue)Sets the hue part to a new value.voidsetLightness(CSSValueImpl lightness)Sets the lightness part to a new value.voidsetSaturation(CSSValueImpl saturation)Sets the saturation part to a new value.java.lang.StringtoString()
-
-
-
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.DOMExceptionConstructor 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:
toStringin classjava.lang.Object
-
-