Class RGBColorValue

  • All Implemented Interfaces:
    Value

    public class RGBColorValue
    extends AbstractValue
    This class represents RGB colors.
    • Field Detail

      • red

        protected Value red
        The red component.
      • green

        protected Value green
        The green component.
      • blue

        protected Value blue
        The blue component.
    • Constructor Detail

      • RGBColorValue

        public RGBColorValue​(Value r,
                             Value g,
                             Value b)
        Creates a new RGBColorValue.
    • Method Detail

      • getCssText

        public java.lang.String getCssText()
        A string representation of the current value.
      • getRed

        public Value getRed()
                     throws org.w3c.dom.DOMException
        Implements Value.getRed().
        Specified by:
        getRed in interface Value
        Overrides:
        getRed in class AbstractValue
        Throws:
        org.w3c.dom.DOMException - INVALID_ACCESS_ERR: Raised if the value doesn't contain a RGB color value.
      • getGreen

        public Value getGreen()
                       throws org.w3c.dom.DOMException
        Implements Value.getGreen().
        Specified by:
        getGreen in interface Value
        Overrides:
        getGreen in class AbstractValue
        Throws:
        org.w3c.dom.DOMException - INVALID_ACCESS_ERR: Raised if the value doesn't contain a RGB color value.
      • getBlue

        public Value getBlue()
                      throws org.w3c.dom.DOMException
        Implements Value.getBlue().
        Specified by:
        getBlue in interface Value
        Overrides:
        getBlue in class AbstractValue
        Throws:
        org.w3c.dom.DOMException - INVALID_ACCESS_ERR: Raised if the value doesn't contain a RGB color value.
      • toString

        public java.lang.String toString()
        Returns a printable representation of the color.
        Overrides:
        toString in class java.lang.Object