1 18 package org.apache.batik.css.engine.value; 19 20 import org.apache.batik.css.engine.CSSEngine; 21 import org.apache.batik.css.engine.CSSStylableElement; 22 import org.apache.batik.css.engine.StyleMap; 23 import org.w3c.dom.css.CSSPrimitiveValue; 24 import org.w3c.dom.css.CSSValue; 25 import org.w3c.dom.DOMException ; 26 27 34 public abstract class AbstractValueManager 35 extends AbstractValueFactory 36 implements ValueManager { 37 38 41 public Value createFloatValue(short unitType, float floatValue) 42 throws DOMException { 43 throw createDOMException(); 44 } 45 46 50 public Value createStringValue(short type, String value, CSSEngine engine) 51 throws DOMException { 52 throw createDOMException(); 53 } 54 55 59 public Value computeValue(CSSStylableElement elt, 60 String pseudo, 61 CSSEngine engine, 62 int idx, 63 StyleMap sm, 64 Value value) { 65 66 if ((value.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) && 67 (value.getPrimitiveType() == CSSPrimitiveValue.CSS_URI)) { 68 return new URIValue(value.getStringValue(), 70 value.getStringValue()); 71 } 72 return value; 73 } 74 } 75 | Popular Tags |