Class RGBColorImpl
java.lang.Object
org.htmlunit.cssparser.dom.RGBColorImpl
- All Implemented Interfaces:
Serializable
Implementation of RGBColor.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CSSValueImplprivate CSSValueImplprivate final booleanprivate final Stringprivate CSSValueImplprivate CSSValueImpl -
Constructor Summary
ConstructorsConstructorDescriptionRGBColorImpl(String function, LexicalUnit lu) Constructor that reads the values from the given chain of LexicalUnits. -
Method Summary
Modifier and TypeMethodDescriptiongetAlpha()getBlue()getGreen()private static CSSValueImplgetPart(LexicalUnit next) getRed()voidsetAlpha(CSSValueImpl alpha) Sets the alpha part to a new value.voidsetBlue(CSSValueImpl blue) Sets the blue part to a new value.voidsetGreen(CSSValueImpl green) Sets the green part to a new value.voidsetRed(CSSValueImpl red) Sets the red part to a new value.toString()
-
Field Details
-
function_
-
red_
-
green_
-
blue_
-
alpha_
-
commaSeparated_
private final boolean commaSeparated_
-
-
Constructor Details
-
RGBColorImpl
Constructor that reads the values from the given chain of LexicalUnits.- Parameters:
function- the name of the function; rgb or rgbalu- the values- Throws:
DOMException- in case of error
-
-
Method Details
-
getPart
-
getRed
- Returns:
- the red part.
-
setRed
Sets the red part to a new value.- Parameters:
red- the new CSSPrimitiveValue
-
getGreen
- Returns:
- the green part.
-
setGreen
Sets the green part to a new value.- Parameters:
green- the new CSSPrimitiveValue
-
getBlue
- Returns:
- the blue part.
-
setBlue
Sets the blue part to a new value.- Parameters:
blue- the new CSSPrimitiveValue
-
getAlpha
- Returns:
- the alpha part.
-
setAlpha
Sets the alpha part to a new value.- Parameters:
alpha- the new CSSPrimitiveValue
-
toString
-