org.apache.batik.parser.style
Class CSSRGBColorValue
java.lang.Object
|
+--org.apache.batik.parser.style.AbstractCSSValue
|
+--org.apache.batik.parser.style.CSSRGBColorValue
- All Implemented Interfaces:
- CSSPrimitiveValue, CSSValue, CSSValueList, RGBColor
- public class CSSRGBColorValue
- extends AbstractCSSValue
- implements RGBColor
This class represents CSS color values
Fields inherited from interface org.w3c.dom.css.CSSPrimitiveValue |
CSS_ATTR, CSS_CM, CSS_COUNTER, CSS_DEG, CSS_DIMENSION, CSS_EMS, CSS_EXS, CSS_GRAD, CSS_HZ, CSS_IDENT, CSS_IN, CSS_KHZ, CSS_MM, CSS_MS, CSS_NUMBER, CSS_PC, CSS_PERCENTAGE, CSS_PT, CSS_PX, CSS_RAD, CSS_RECT, CSS_RGBCOLOR, CSS_S, CSS_STRING, CSS_UNKNOWN, CSS_URI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
red
protected CSSPrimitiveValue red
- The red value
green
protected CSSPrimitiveValue green
- The green value
blue
protected CSSPrimitiveValue blue
- The blue value
CSSRGBColorValue
public CSSRGBColorValue(CSSPrimitiveValue r,
CSSPrimitiveValue g,
CSSPrimitiveValue b)
- Creates a new color value.
- Parameters:
r
- The red component.g
- The green component.b
- The blue component.
getCssValueType
public short getCssValueType()
- DOM: Implements
CSSValue.getCssValueType()
.
getPrimitiveType
public short getPrimitiveType()
- DOM: Implements
CSSPrimitiveValue.getPrimitiveType()
.
- Overrides:
getPrimitiveType
in class AbstractCSSValue
getCssText
public java.lang.String getCssText()
- DOM: Implements
CSSValue.getCssText()
.
- Following copied from interface:
org.w3c.dom.css.CSSValue
- Throws:
DOMException
- SYNTAX_ERR: Raised if the specified CSS string value has a syntax
error (according to the attached property) or is unparsable.
INVALID_MODIFICATION_ERR: Raised if the specified CSS string
value represents a different type of values than the values allowed
by the CSS property.
NO_MODIFICATION_ALLOWED_ERR: Raised if this value is readonly.
getRed
public CSSPrimitiveValue getRed()
- DOM: Implements
RGBColor.getRed()
.
- Specified by:
getRed
in interface RGBColor
getGreen
public CSSPrimitiveValue getGreen()
- DOM: Implements
RGBColor.getGreen()
.
- Specified by:
getGreen
in interface RGBColor
getBlue
public CSSPrimitiveValue getBlue()
- DOM: Implements
RGBColor.getBlue()
.
- Specified by:
getBlue
in interface RGBColor
getRGBColorValue
public RGBColor getRGBColorValue()
throws DOMException
- DOM: Implements
CSSPrimitiveValue.getRGBColorValue()
.
- Overrides:
getRGBColorValue
in class AbstractCSSValue
- Following copied from interface:
org.w3c.dom.css.CSSPrimitiveValue
- Returns:
- the RGB color value.
- Throws:
DOMException
- INVALID_ACCESS_ERR: Raised if the attached property can't return a
RGB color value (e.g. this is not CSS_RGBCOLOR
).
Copyright © 2001 Apache Software Foundation. All Rights Reserved.