Class RGBColorImpl

  • All Implemented Interfaces:
    java.io.Serializable

    public class RGBColorImpl
    extends java.lang.Object
    implements java.io.Serializable
    Implementation of RGBColor.
    See Also:
    Serialized Form
    • Constructor Detail

      • RGBColorImpl

        public RGBColorImpl​(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; rgb or rgba
        lu - the values
        Throws:
        org.w3c.dom.DOMException - in case of error
    • Method Detail

      • getRed

        public CSSValueImpl getRed()
        Returns:
        the red part.
      • setRed

        public void setRed​(CSSValueImpl red)
        Sets the red part to a new value.
        Parameters:
        red - the new CSSPrimitiveValue
      • getGreen

        public CSSValueImpl getGreen()
        Returns:
        the green part.
      • setGreen

        public void setGreen​(CSSValueImpl green)
        Sets the green part to a new value.
        Parameters:
        green - the new CSSPrimitiveValue
      • getBlue

        public CSSValueImpl getBlue()
        Returns:
        the blue part.
      • setBlue

        public void setBlue​(CSSValueImpl blue)
        Sets the blue part to a new value.
        Parameters:
        blue - 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