org.apache.batik.css.svg
Class ImmutableSVGColorValue

java.lang.Object
  |
  +--org.apache.batik.css.value.AbstractImmutableValue
        |
        +--org.apache.batik.css.svg.ImmutableSVGColorValue
All Implemented Interfaces:
ImmutableValue, RGBColor, SVGICCColor, SVGImmutableValue
Direct Known Subclasses:
ImmutableSVGPaintValue

public class ImmutableSVGColorValue
extends AbstractImmutableValue
implements SVGImmutableValue, RGBColor, SVGICCColor

This class represents the immutable value used to implement a SVGColor.


Field Summary
protected  CSSPrimitiveValue blue
          The blue value
protected  java.lang.String colorProfile
          The color profile.
protected  SVGCSSNumberList colors
          The colors.
protected  short colorType
          The SVG color type.
protected  CSSPrimitiveValue green
          The green value
protected  CSSPrimitiveValue red
          The red value
 
Constructor Summary
ImmutableSVGColorValue(short ctype, CSSPrimitiveValue r, CSSPrimitiveValue g, CSSPrimitiveValue b, java.lang.String cprofile, SVGCSSNumberList l)
          Creates a new ImmutableSVGColorValue.
 
Method Summary
 ImmutableValue createReadOnlyCopy()
          Returns a deep read-only copy of this object.
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is "equal to" this one.
 CSSPrimitiveValue getBlue()
          This attribute is used for the blue value of the RGB color.
 java.lang.String getColorProfile()
          Returns the color profile of this ICC color.
 SVGNumberList getColors()
          Returns the colors in this ICC color.
 short getColorType()
          Returns the color type, if this object represents a SVGColor.
 java.lang.String getCssText()
          A string representation of the current value.
 CSSPrimitiveValue getGreen()
          This attribute is used for the green value of the RGB color.
 SVGICCColor getICCColor()
          Returns the RGBColor, if this object represents a SVGColor.
 short getPaintType()
          Returns the paint type, if this object represents a SVGPaint.
 CSSPrimitiveValue getRed()
          This attribute is used for the red value of the RGB color.
 RGBColor getRGBColor()
          Returns the RGBColor, if this object represents a SVGColor.
 java.lang.String getUri()
          Returns the URI of the paint, if this object represents a SVGPaint.
 void setColorProfile(java.lang.String colorProfile)
          Sets the color profile of this ICC color.
 
Methods inherited from class org.apache.batik.css.value.AbstractImmutableValue
getCounterValue, getCssValueType, getFloatValue, getLength, getPrimitiveType, getRectValue, getRGBColorValue, getStringValue, item
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.batik.css.value.ImmutableValue
getCounterValue, getCssValueType, getFloatValue, getLength, getPrimitiveType, getRectValue, getRGBColorValue, getStringValue, item
 

Field Detail

colorType

protected short colorType
The SVG color type.

red

protected CSSPrimitiveValue red
The red value

green

protected CSSPrimitiveValue green
The green value

blue

protected CSSPrimitiveValue blue
The blue value

colorProfile

protected java.lang.String colorProfile
The color profile.

colors

protected SVGCSSNumberList colors
The colors.
Constructor Detail

ImmutableSVGColorValue

public ImmutableSVGColorValue(short ctype,
                              CSSPrimitiveValue r,
                              CSSPrimitiveValue g,
                              CSSPrimitiveValue b,
                              java.lang.String cprofile,
                              SVGCSSNumberList l)
Creates a new ImmutableSVGColorValue.
Method Detail

equals

public boolean equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.
Overrides:
equals in class java.lang.Object
Parameters:
obj - the reference object with which to compare.

createReadOnlyCopy

public ImmutableValue createReadOnlyCopy()
Returns a deep read-only copy of this object.
Specified by:
createReadOnlyCopy in interface ImmutableValue

getCssText

public java.lang.String getCssText()
A string representation of the current value.
Specified by:
getCssText in interface ImmutableValue

getPaintType

public short getPaintType()
Returns the paint type, if this object represents a SVGPaint.
Specified by:
getPaintType in interface SVGImmutableValue

getUri

public java.lang.String getUri()
Returns the URI of the paint, if this object represents a SVGPaint.
Specified by:
getUri in interface SVGImmutableValue

getColorType

public short getColorType()
Returns the color type, if this object represents a SVGColor.
Specified by:
getColorType in interface SVGImmutableValue

getRGBColor

public RGBColor getRGBColor()
Returns the RGBColor, if this object represents a SVGColor.
Specified by:
getRGBColor in interface SVGImmutableValue

getICCColor

public SVGICCColor getICCColor()
Returns the RGBColor, if this object represents a SVGColor.
Specified by:
getICCColor in interface SVGImmutableValue

getRed

public CSSPrimitiveValue getRed()
This attribute is used for the red value of the RGB color.
Specified by:
getRed in interface RGBColor

getGreen

public CSSPrimitiveValue getGreen()
This attribute is used for the green value of the RGB color.
Specified by:
getGreen in interface RGBColor

getBlue

public CSSPrimitiveValue getBlue()
This attribute is used for the blue value of the RGB color.
Specified by:
getBlue in interface RGBColor

getColorProfile

public java.lang.String getColorProfile()
Returns the color profile of this ICC color.
Specified by:
getColorProfile in interface SVGICCColor

setColorProfile

public void setColorProfile(java.lang.String colorProfile)
                     throws DOMException
Sets the color profile of this ICC color.
Specified by:
setColorProfile in interface SVGICCColor

getColors

public SVGNumberList getColors()
Returns the colors in this ICC color.
Specified by:
getColors in interface SVGICCColor


Copyright © 2001 Apache Software Foundation. All Rights Reserved.