## org.apache.batik.css.engine.value
Class RGBColorValue

    java.lang.Object
      org.apache.batik.css.engine.value.AbstractValue
          org.apache.batik.css.engine.value.RGBColorValue

All Implemented Interfaces:
  Value

    public class RGBColorValue

extends AbstractValue

This class represents RGB colors.

Field Summary
`protected Value` `blue` The blue component.
`protected Value` `green` The green component.
`protected Value` `red` The red component.

Constructor Summary
`RGBColorValue(Value r, Value g, Value b)` Creates a new RGBColorValue.

Method Summary
`Value` `getBlue()` Implements `Value.getBlue()`.
`java.lang.String` `getCssText()` A string representation of the current value.
`Value` `getGreen()` Implements `Value.getGreen()`.
`short` `getPrimitiveType()` The type of the value.
`Value` `getRed()` Implements `Value.getRed()`.
`java.lang.String` `toString()` Returns a printable representation of the color.

Methods inherited from class org.apache.batik.css.engine.value.AbstractValue
`createDOMException, getBottom, getCssValueType, getFloatValue, getIdentifier, getLeft, getLength, getListStyle, getRight, getSeparator, getStringValue, getTop, item`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

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

### getPrimitiveType

    public short getPrimitiveType()

  The type of the value.

  Specified by:
    `getPrimitiveType` in interface `Value`
  Overrides:
    `getPrimitiveType` in class `AbstractValue`

### 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`

Copyright © 2008 Apache Software Foundation. All Rights Reserved.