org.apache.batik.css.value
Interface ImmutableValue

All Known Subinterfaces:
SVGImmutableValue
All Known Implementing Classes:
AbstractImmutableValue

public interface ImmutableValue

This interface represents an immutable CSS value.


Method Summary
 ImmutableValue createReadOnlyCopy()
          Returns a deep read-only copy of this object.
 Counter getCounterValue()
          This method is used to get the Counter value.
 java.lang.String getCssText()
          A string representation of the current value.
 short getCssValueType()
          A code defining the type of the value.
 float getFloatValue(short unitType)
          A method to get the float value with a specified unit.
 int getLength()
          The number of CSSValues in the list.
 short getPrimitiveType()
          The type of the value.
 Rect getRectValue()
          This method is used to get the Rect value.
 RGBColor getRGBColorValue()
          This method is used to get the RGB color.
 java.lang.String getStringValue()
          This method is used to get the string value.
 CSSValue item(int index)
          Used to retrieve a CSS rule by ordinal index.
 

Method Detail

createReadOnlyCopy

public ImmutableValue createReadOnlyCopy()
Returns a deep read-only copy of this object.

getCssText

public java.lang.String getCssText()
A string representation of the current value.

getCssValueType

public short getCssValueType()
A code defining the type of the value.

getPrimitiveType

public short getPrimitiveType()
The type of the value.

getFloatValue

public float getFloatValue(short unitType)
                    throws DOMException
A method to get the float value with a specified unit.
Throws:
DOMException - INVALID_ACCESS_ERR: Raised if the attached property doesn't support the float value or the unit type.

getStringValue

public java.lang.String getStringValue()
                                throws DOMException
This method is used to get the string value.
Throws:
DOMException - INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a string value.

getCounterValue

public Counter getCounterValue()
                        throws DOMException
This method is used to get the Counter value.
Throws:
DOMException - INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a Counter value (e.g. this is not CSS_COUNTER).

getRectValue

public Rect getRectValue()
                  throws DOMException
This method is used to get the Rect value.
Throws:
DOMException - INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a Rect value. (e.g. this is not CSS_RECT).

getRGBColorValue

public RGBColor getRGBColorValue()
                          throws DOMException
This method is used to get the RGB color.
Throws:
DOMException - INVALID_ACCESS_ERR: Raised if the attached property can't return a RGB color value (e.g. this is not CSS_RGBCOLOR).

getLength

public int getLength()
The number of CSSValues in the list. The range of valid values of the indices is 0 to length-1 inclusive.

item

public CSSValue item(int index)
Used to retrieve a CSS rule by ordinal index.
Returns:
The style rule at the index position in the CSSValueList, or null if that is not a valid index.


Copyright © 2001 Apache Software Foundation. All Rights Reserved.