org.apache.batik.parser.style
Class CSSStringValue

java.lang.Object
  |
  +--org.apache.batik.parser.style.AbstractCSSValue
        |
        +--org.apache.batik.parser.style.CSSStringValue
All Implemented Interfaces:
CSSPrimitiveValue, CSSValue, CSSValueList

public class CSSStringValue
extends AbstractCSSValue

This class represents CSS string values


Field Summary
protected  java.lang.String stringValue
          The string value
protected  short unitType
          The unit type
 
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
 
Fields inherited from interface org.w3c.dom.css.CSSValue
CSS_CUSTOM, CSS_INHERIT, CSS_PRIMITIVE_VALUE, CSS_VALUE_LIST
 
Constructor Summary
CSSStringValue(short unitType, java.lang.String stringValue)
          Creates a new value.
 
Method Summary
 java.lang.String getCssText()
          DOM: Implements CSSValue.getCssText().
 short getCssValueType()
          DOM: Implements CSSValue.getCssValueType().
 short getPrimitiveType()
          DOM: Implements CSSPrimitiveValue.getPrimitiveType().
 java.lang.String getStringValue()
          DOM: Implements CSSPrimitiveValue.getStringValue().
 
Methods inherited from class org.apache.batik.parser.style.AbstractCSSValue
getCounterValue, getFloatValue, getLength, getRectValue, getRGBColorValue, item, setCssText, setFloatValue, setStringValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stringValue

protected java.lang.String stringValue
The string value

unitType

protected short unitType
The unit type
Constructor Detail

CSSStringValue

public CSSStringValue(short unitType,
                      java.lang.String stringValue)
Creates a new value.
Method Detail

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.

getStringValue

public java.lang.String getStringValue()
                                throws DOMException
DOM: Implements CSSPrimitiveValue.getStringValue().
Overrides:
getStringValue in class AbstractCSSValue
Following copied from interface: org.w3c.dom.css.CSSPrimitiveValue
Returns:
The string value in the current unit. The current primitiveType can only be a string unit type (i.e. CSS_STRING, CSS_URI, CSS_IDENT and CSS_ATTR).
Throws:
DOMException - INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a string value.


Copyright © 2001 Apache Software Foundation. All Rights Reserved.