Class 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 Detail

      • function_

        private final java.lang.String function_
      • 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 hsla
        lu - 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 class java.lang.Object