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.
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().
Overrides:
getRed in class AbstractValue
Following copied from interface: org.apache.batik.css.engine.value.Value
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().
Overrides:
getGreen in class AbstractValue
Following copied from interface: org.apache.batik.css.engine.value.Value
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().
Overrides:
getBlue in class AbstractValue
Following copied from interface: org.apache.batik.css.engine.value.Value
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 © 2004 Apache Software Foundation. All Rights Reserved.