Class RGBColorImpl

java.lang.Object
org.htmlunit.cssparser.dom.RGBColorImpl
All Implemented Interfaces:
Serializable

public class RGBColorImpl extends Object implements Serializable
Implementation of RGBColor.
See Also:
  • Field Details

  • Constructor Details

    • RGBColorImpl

      public RGBColorImpl(String function, LexicalUnit lu) throws 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:
      DOMException - in case of error
  • Method Details

    • getPart

      private static CSSValueImpl getPart(LexicalUnit next)
    • 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 String toString()
      Overrides:
      toString in class Object