## org.apache.batik.css.dom
Class CSSOMSVGColor

    java.lang.Object
      org.apache.batik.css.dom.CSSOMSVGColor

All Implemented Interfaces:
  org.w3c.dom.css.CSSValue, org.w3c.dom.css.RGBColor, SVGColor, SVGICCColor, SVGNumberList

Direct Known Subclasses:
  CSSOMSVGComputedStyle.ComputedCSSColorValue, CSSOMSVGPaint, CSSOMSVGStyleDeclaration.StyleDeclarationColorValue, SVGStylableElement.PresentationAttributeColorValue

public class CSSOMSVGColor
extends java.lang.Object
implements SVGColor, org.w3c.dom.css.RGBColor, SVGICCColor, SVGNumberList

This class implements the `SVGColor` interface.

Nested Class Summary
`protected class` `CSSOMSVGColor.AbstractComponent` To store a component.
`class` `CSSOMSVGColor.AbstractModificationHandler` Provides an abstract implementation of a ModificationHandler.
`protected class` `CSSOMSVGColor.BlueComponent` To represents a blue component.
`protected class` `CSSOMSVGColor.ColorNumber` To represent a SVGNumber which is part of a color list.
`protected class` `CSSOMSVGColor.FloatComponent` To store a Float component.
`protected class` `CSSOMSVGColor.GreenComponent` To represents a green component.
`static interface` `CSSOMSVGColor.ModificationHandler` To manage the modifications on a CSS value.
`protected class` `CSSOMSVGColor.RedComponent` To represents a red component.
`static interface` `CSSOMSVGColor.ValueProvider` To provides the actual value.

Field Summary
`protected CSSOMSVGColor.BlueComponent` `blueComponent` The blue component, if this value is a RGBColor.
`protected CSSOMSVGColor.GreenComponent` `greenComponent` The green component, if this value is a RGBColor.
`protected CSSOMSVGColor.ModificationHandler` `handler` The modifications handler.
`protected java.util.ArrayList` `iccColors` To store the ICC color list.
`protected CSSOMSVGColor.RedComponent` `redComponent` The red component, if this value is a RGBColor.
`protected CSSOMSVGColor.ValueProvider` `valueProvider` The associated value.

Fields inherited from interface org.w3c.dom.svg.SVGColor
`SVG_COLORTYPE_CURRENTCOLOR, SVG_COLORTYPE_RGBCOLOR, SVG_COLORTYPE_RGBCOLOR_ICCCOLOR, SVG_COLORTYPE_UNKNOWN`

Fields inherited from interface org.w3c.dom.css.CSSValue
`CSS_CUSTOM, CSS_INHERIT, CSS_PRIMITIVE_VALUE, CSS_VALUE_LIST`

Constructor Summary
`CSSOMSVGColor(CSSOMSVGColor.ValueProvider vp)` Creates a new CSSOMSVGColor.

Method Summary
`SVGNumber` `appendItem(SVGNumber newItem)` DOM: Implements `SVGNumberList.appendItem(SVGNumber)`.
`void` `clear()` DOM: Implements `SVGNumberList.clear()`.
`org.w3c.dom.css.CSSPrimitiveValue` `getBlue()` DOM: Implements `RGBColor.getBlue()`.
`java.lang.String` `getColorProfile()` DOM: Implements `SVGICCColor.getColorProfile()`.
`SVGNumberList` `getColors()` DOM: Implements `SVGICCColor.getColors()`.
`short` `getColorType()` DOM: Implements `SVGColor.getColorType()`.
`java.lang.String` `getCssText()` DOM: Implements `CSSValue.getCssText()`.
`short` `getCssValueType()` DOM: Implements `CSSValue.getCssValueType()`.
`org.w3c.dom.css.CSSPrimitiveValue` `getGreen()` DOM: Implements `RGBColor.getGreen()`.
`SVGICCColor` `getICCColor()` DOM: Implements `SVGColor.getICCColor()`.
`SVGNumber` `getItem(int index)` DOM: Implements `SVGNumberList.getItem(int)`.
`int` `getNumberOfItems()` DOM: Implements `SVGNumberList.getNumberOfItems()`.
`org.w3c.dom.css.CSSPrimitiveValue` `getRed()` DOM: Implements `RGBColor.getRed()`.
`org.w3c.dom.css.RGBColor` `getRGBColor()` DOM: Implements `SVGColor.getRGBColor()`.
`SVGNumber` `initialize(SVGNumber newItem)` DOM: Implements `SVGNumberList.initialize(SVGNumber)`.
`SVGNumber` `insertItemBefore(SVGNumber newItem, int index)` DOM: Implements `SVGNumberList.insertItemBefore(SVGNumber,int)`.
`SVGNumber` `removeItem(int index)` DOM: Implements `SVGNumberList.removeItem(int)`.
`SVGNumber` `replaceItem(SVGNumber newItem, int index)` DOM: Implements `SVGNumberList.replaceItem(SVGNumber,int)`.
`void` `setColor(short type, java.lang.String rgb, java.lang.String icc)` DOM: Implements `SVGColor.setColor(short,String,String)`.
`void` `setColorProfile(java.lang.String colorProfile)` DOM: Implements `SVGICCColor.setColorProfile(String)`.
`void` `setCssText(java.lang.String cssText)` DOM: Implements `CSSValue.setCssText(String)`.
`void` `setModificationHandler(CSSOMSVGColor.ModificationHandler h)` Sets the modification handler of this value.
`void` `setRGBColor(java.lang.String color)` DOM: Implements `SVGColor.setRGBColor(String)`.
`void` `setRGBColorICCColor(java.lang.String rgb, java.lang.String icc)` DOM: Implements `SVGColor.setRGBColorICCColor(String,String)`.

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

Field Detail

### valueProvider

    protected CSSOMSVGColor.ValueProvider valueProvider

  The associated value.

### handler

    protected CSSOMSVGColor.ModificationHandler handler

  The modifications handler.

### redComponent

    protected CSSOMSVGColor.RedComponent redComponent

  The red component, if this value is a RGBColor.

### greenComponent

    protected CSSOMSVGColor.GreenComponent greenComponent

  The green component, if this value is a RGBColor.

### blueComponent

    protected CSSOMSVGColor.BlueComponent blueComponent

  The blue component, if this value is a RGBColor.

### iccColors

    protected java.util.ArrayList iccColors

  To store the ICC color list.

Constructor Detail

### CSSOMSVGColor

    public CSSOMSVGColor(CSSOMSVGColor.ValueProvider vp)

  Creates a new CSSOMSVGColor.

Method Detail

### setModificationHandler

    public void setModificationHandler(CSSOMSVGColor.ModificationHandler h)

  Sets the modification handler of this value.

### getCssText

    public java.lang.String getCssText()

  DOM: Implements `CSSValue.getCssText()`.

  Specified by:
    `getCssText` in interface `org.w3c.dom.css.CSSValue`

### setCssText

    public void setCssText(java.lang.String cssText)
                    throws org.w3c.dom.DOMException

  DOM: Implements `CSSValue.setCssText(String)`.

  Specified by:
    `setCssText` in interface `org.w3c.dom.css.CSSValue`
  Throws:
    `org.w3c.dom.DOMException`

### getCssValueType

    public short getCssValueType()

  DOM: Implements `CSSValue.getCssValueType()`.

  Specified by:
    `getCssValueType` in interface `org.w3c.dom.css.CSSValue`

### getColorType

    public short getColorType()

  DOM: Implements `SVGColor.getColorType()`.

  Specified by:
    `getColorType` in interface `SVGColor`

### getRGBColor

    public org.w3c.dom.css.RGBColor getRGBColor()

  DOM: Implements `SVGColor.getRGBColor()`.

  Specified by:
    `getRGBColor` in interface `SVGColor`

### setRGBColor

    public void setRGBColor(java.lang.String color)

  DOM: Implements `SVGColor.setRGBColor(String)`.

  Specified by:
    `setRGBColor` in interface `SVGColor`

### getICCColor

    public SVGICCColor getICCColor()

  DOM: Implements `SVGColor.getICCColor()`.

  Specified by:
    `getICCColor` in interface `SVGColor`

### setRGBColorICCColor

    public void setRGBColorICCColor(java.lang.String rgb,
                                    java.lang.String icc)

  DOM: Implements `SVGColor.setRGBColorICCColor(String,String)`.

  Specified by:
    `setRGBColorICCColor` in interface `SVGColor`

### setColor

    public void setColor(short type,
                         java.lang.String rgb,
                         java.lang.String icc)

  DOM: Implements `SVGColor.setColor(short,String,String)`.

  Specified by:
    `setColor` in interface `SVGColor`

### getRed

    public org.w3c.dom.css.CSSPrimitiveValue getRed()

  DOM: Implements `RGBColor.getRed()`.

  Specified by:
    `getRed` in interface `org.w3c.dom.css.RGBColor`

### getGreen

    public org.w3c.dom.css.CSSPrimitiveValue getGreen()

  DOM: Implements `RGBColor.getGreen()`.

  Specified by:
    `getGreen` in interface `org.w3c.dom.css.RGBColor`

### getBlue

    public org.w3c.dom.css.CSSPrimitiveValue getBlue()

  DOM: Implements `RGBColor.getBlue()`.

  Specified by:
    `getBlue` in interface `org.w3c.dom.css.RGBColor`

### getColorProfile

    public java.lang.String getColorProfile()

  DOM: Implements `SVGICCColor.getColorProfile()`.

  Specified by:
    `getColorProfile` in interface `SVGICCColor`

### setColorProfile

    public void setColorProfile(java.lang.String colorProfile)
                         throws org.w3c.dom.DOMException

  DOM: Implements `SVGICCColor.setColorProfile(String)`.

  Specified by:
    `setColorProfile` in interface `SVGICCColor`
  Throws:
    `org.w3c.dom.DOMException`

### getColors

    public SVGNumberList getColors()

  DOM: Implements `SVGICCColor.getColors()`.

  Specified by:
    `getColors` in interface `SVGICCColor`

### getNumberOfItems

    public int getNumberOfItems()

  DOM: Implements `SVGNumberList.getNumberOfItems()`.

  Specified by:
    `getNumberOfItems` in interface `SVGNumberList`

### clear

    public void clear()
               throws org.w3c.dom.DOMException

  DOM: Implements `SVGNumberList.clear()`.

  Specified by:
    `clear` in interface `SVGNumberList`
  Throws:
    `org.w3c.dom.DOMException`

### initialize

    public SVGNumber initialize(SVGNumber newItem)
                         throws org.w3c.dom.DOMException

  DOM: Implements `SVGNumberList.initialize(SVGNumber)`.

  Specified by:
    `initialize` in interface `SVGNumberList`
  Throws:
    `org.w3c.dom.DOMException`

### getItem

    public SVGNumber getItem(int index)
                      throws org.w3c.dom.DOMException

  DOM: Implements `SVGNumberList.getItem(int)`.

  Specified by:
    `getItem` in interface `SVGNumberList`
  Throws:
    `org.w3c.dom.DOMException`

### insertItemBefore

    public SVGNumber insertItemBefore(SVGNumber newItem,
                                      int index)
                               throws org.w3c.dom.DOMException

  DOM: Implements `SVGNumberList.insertItemBefore(SVGNumber,int)`.

  Specified by:
    `insertItemBefore` in interface `SVGNumberList`
  Throws:
    `org.w3c.dom.DOMException`

### replaceItem

    public SVGNumber replaceItem(SVGNumber newItem,
                                 int index)
                          throws org.w3c.dom.DOMException

  DOM: Implements `SVGNumberList.replaceItem(SVGNumber,int)`.

  Specified by:
    `replaceItem` in interface `SVGNumberList`
  Throws:
    `org.w3c.dom.DOMException`

### removeItem

    public SVGNumber removeItem(int index)
                         throws org.w3c.dom.DOMException

  DOM: Implements `SVGNumberList.removeItem(int)`.

  Specified by:
    `removeItem` in interface `SVGNumberList`
  Throws:
    `org.w3c.dom.DOMException`

### appendItem

    public SVGNumber appendItem(SVGNumber newItem)
                         throws org.w3c.dom.DOMException

  DOM: Implements `SVGNumberList.appendItem(SVGNumber)`.

  Specified by:
    `appendItem` in interface `SVGNumberList`
  Throws:
    `org.w3c.dom.DOMException`

Copyright © 2004 Apache Software Foundation. All Rights Reserved.