org.apache.batik.css.dom
Class CSSOMSVGColor

java.lang.Object
  extended by org.apache.batik.css.dom.CSSOMSVGColor
All Implemented Interfaces:
CSSValue, RGBColor, org.w3c.dom.svg.SVGColor, org.w3c.dom.svg.SVGICCColor, org.w3c.dom.svg.SVGNumberList
Direct Known Subclasses:
CSSOMSVGComputedStyle.ComputedCSSColorValue, CSSOMSVGPaint, CSSOMSVGStyleDeclaration.StyleDeclarationColorValue, SVGStylableElement.PresentationAttributeColorValue

public class CSSOMSVGColor
extends Object
implements org.w3c.dom.svg.SVGColor, RGBColor, org.w3c.dom.svg.SVGICCColor, org.w3c.dom.svg.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 provide 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  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
 org.w3c.dom.svg.SVGNumber appendItem(org.w3c.dom.svg.SVGNumber newItem)
          DOM: Implements SVGNumberList.appendItem(SVGNumber).
 void clear()
          DOM: Implements SVGNumberList.clear().
 CSSPrimitiveValue getBlue()
          DOM: Implements RGBColor.getBlue().
 String getColorProfile()
          DOM: Implements SVGICCColor.getColorProfile().
 org.w3c.dom.svg.SVGNumberList getColors()
          DOM: Implements SVGICCColor.getColors().
 short getColorType()
          DOM: Implements SVGColor.getColorType().
 String getCssText()
          DOM: Implements CSSValue.getCssText().
 short getCssValueType()
          DOM: Implements CSSValue.getCssValueType().
 CSSPrimitiveValue getGreen()
          DOM: Implements RGBColor.getGreen().
 org.w3c.dom.svg.SVGICCColor getIccColor()
          Returns the SVGICCColor value of this SVGColor.
 org.w3c.dom.svg.SVGICCColor getICCColor()
          DOM: Implements SVGColor.getICCColor().
 org.w3c.dom.svg.SVGNumber getItem(int index)
          DOM: Implements SVGNumberList.getItem(int).
 int getNumberOfItems()
          DOM: Implements SVGNumberList.getNumberOfItems().
 CSSPrimitiveValue getRed()
          DOM: Implements RGBColor.getRed().
 RGBColor getRgbColor()
          Returns the RGBColor value for this SVGColor.
 RGBColor getRGBColor()
          DOM: Implements SVGColor.getRGBColor().
 org.w3c.dom.svg.SVGNumber initialize(org.w3c.dom.svg.SVGNumber newItem)
          DOM: Implements SVGNumberList.initialize(SVGNumber).
 org.w3c.dom.svg.SVGNumber insertItemBefore(org.w3c.dom.svg.SVGNumber newItem, int index)
          DOM: Implements SVGNumberList.insertItemBefore(SVGNumber,int).
 org.w3c.dom.svg.SVGNumber removeItem(int index)
          DOM: Implements SVGNumberList.removeItem(int).
 org.w3c.dom.svg.SVGNumber replaceItem(org.w3c.dom.svg.SVGNumber newItem, int index)
          DOM: Implements SVGNumberList.replaceItem(SVGNumber,int).
 void setColor(short type, String rgb, String icc)
          DOM: Implements SVGColor.setColor(short,String,String).
 void setColorProfile(String colorProfile)
          DOM: Implements SVGICCColor.setColorProfile(String).
 void setCssText(String cssText)
          DOM: Implements CSSValue.setCssText(String).
 void setModificationHandler(CSSOMSVGColor.ModificationHandler h)
          Sets the modification handler of this value.
 void setRGBColor(String color)
          DOM: Implements SVGColor.setRGBColor(String).
 void setRGBColorICCColor(String rgb, 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 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 String getCssText()
DOM: Implements CSSValue.getCssText().

Specified by:
getCssText in interface CSSValue

setCssText

public void setCssText(String cssText)
                throws DOMException
DOM: Implements CSSValue.setCssText(String).

Specified by:
setCssText in interface CSSValue
Throws:
DOMException

getCssValueType

public short getCssValueType()
DOM: Implements CSSValue.getCssValueType().

Specified by:
getCssValueType in interface CSSValue

getColorType

public short getColorType()
DOM: Implements SVGColor.getColorType().

Specified by:
getColorType in interface org.w3c.dom.svg.SVGColor

getRGBColor

public RGBColor getRGBColor()
DOM: Implements SVGColor.getRGBColor().

Specified by:
getRGBColor in interface org.w3c.dom.svg.SVGColor

getRgbColor

public RGBColor getRgbColor()
Returns the RGBColor value for this SVGColor. For the SVG 1.1 ECMAScript binding.


setRGBColor

public void setRGBColor(String color)
DOM: Implements SVGColor.setRGBColor(String).

Specified by:
setRGBColor in interface org.w3c.dom.svg.SVGColor

getICCColor

public org.w3c.dom.svg.SVGICCColor getICCColor()
DOM: Implements SVGColor.getICCColor().

Specified by:
getICCColor in interface org.w3c.dom.svg.SVGColor

getIccColor

public org.w3c.dom.svg.SVGICCColor getIccColor()
Returns the SVGICCColor value of this SVGColor. For the SVG 1.1 ECMAScript binding.


setRGBColorICCColor

public void setRGBColorICCColor(String rgb,
                                String icc)
DOM: Implements SVGColor.setRGBColorICCColor(String,String).

Specified by:
setRGBColorICCColor in interface org.w3c.dom.svg.SVGColor

setColor

public void setColor(short type,
                     String rgb,
                     String icc)
DOM: Implements SVGColor.setColor(short,String,String).

Specified by:
setColor in interface org.w3c.dom.svg.SVGColor

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

getColorProfile

public String getColorProfile()
DOM: Implements SVGICCColor.getColorProfile().

Specified by:
getColorProfile in interface org.w3c.dom.svg.SVGICCColor

setColorProfile

public void setColorProfile(String colorProfile)
                     throws DOMException
DOM: Implements SVGICCColor.setColorProfile(String).

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

getColors

public org.w3c.dom.svg.SVGNumberList getColors()
DOM: Implements SVGICCColor.getColors().

Specified by:
getColors in interface org.w3c.dom.svg.SVGICCColor

getNumberOfItems

public int getNumberOfItems()
DOM: Implements SVGNumberList.getNumberOfItems().

Specified by:
getNumberOfItems in interface org.w3c.dom.svg.SVGNumberList

clear

public void clear()
           throws DOMException
DOM: Implements SVGNumberList.clear().

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

initialize

public org.w3c.dom.svg.SVGNumber initialize(org.w3c.dom.svg.SVGNumber newItem)
                                     throws DOMException
DOM: Implements SVGNumberList.initialize(SVGNumber).

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

getItem

public org.w3c.dom.svg.SVGNumber getItem(int index)
                                  throws DOMException
DOM: Implements SVGNumberList.getItem(int).

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

insertItemBefore

public org.w3c.dom.svg.SVGNumber insertItemBefore(org.w3c.dom.svg.SVGNumber newItem,
                                                  int index)
                                           throws DOMException
DOM: Implements SVGNumberList.insertItemBefore(SVGNumber,int).

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

replaceItem

public org.w3c.dom.svg.SVGNumber replaceItem(org.w3c.dom.svg.SVGNumber newItem,
                                             int index)
                                      throws DOMException
DOM: Implements SVGNumberList.replaceItem(SVGNumber,int).

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

removeItem

public org.w3c.dom.svg.SVGNumber removeItem(int index)
                                     throws DOMException
DOM: Implements SVGNumberList.removeItem(int).

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

appendItem

public org.w3c.dom.svg.SVGNumber appendItem(org.w3c.dom.svg.SVGNumber newItem)
                                     throws DOMException
DOM: Implements SVGNumberList.appendItem(SVGNumber).

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


Copyright © 2008 Apache Software Foundation. All Rights Reserved.