/** * Implements {@link * ValueManager#createStringValue(short,String,CSSEngine)}. */ public Value createStringValue(short type, String value, CSSEngine engine) throws DOMException { if (type == CSSPrimitiveValue.CSS_IDENT) { if (value.equalsIgnoreCase(CSSConstants.CSS_NONE_VALUE)) { return SVGValueConstants.NONE_VALUE; } throw createInvalidIdentifierDOMException(value); } if (type == CSSPrimitiveValue.CSS_URI) { return new URIValue(value, resolveURI(engine.getCSSBaseURI(), value)); } throw createInvalidStringTypeDOMException(type); } }
/** * Implements {@link ValueManager#createValue(LexicalUnit,CSSEngine)}. */ public Value createValue(LexicalUnit lu, CSSEngine engine) throws DOMException { switch (lu.getLexicalUnitType()) { case LexicalUnit.SAC_INHERIT: return SVGValueConstants.INHERIT_VALUE; case LexicalUnit.SAC_URI: return new URIValue(lu.getStringValue(), resolveURI(engine.getCSSBaseURI(), lu.getStringValue())); case LexicalUnit.SAC_IDENT: if (lu.getStringValue().equalsIgnoreCase (CSSConstants.CSS_NONE_VALUE)) { return SVGValueConstants.NONE_VALUE; } throw createInvalidIdentifierDOMException(lu.getStringValue()); } throw createInvalidLexicalUnitDOMException(lu.getLexicalUnitType()); }
/** * Implements {@link ValueManager#createValue(LexicalUnit,CSSEngine)}. */ public Value createValue(LexicalUnit lu, CSSEngine engine) throws DOMException { switch (lu.getLexicalUnitType()) { case LexicalUnit.SAC_INHERIT: return SVGValueConstants.INHERIT_VALUE; case LexicalUnit.SAC_URI: return new URIValue(lu.getStringValue(), resolveURI(engine.getCSSBaseURI(), lu.getStringValue())); case LexicalUnit.SAC_IDENT: if (lu.getStringValue().equalsIgnoreCase (CSSConstants.CSS_NONE_VALUE)) { return SVGValueConstants.NONE_VALUE; } throw createInvalidIdentifierDOMException(lu.getStringValue()); } throw createInvalidLexicalUnitDOMException(lu.getLexicalUnitType()); }
/** * Implements {@link * ValueManager#createStringValue(short,String,CSSEngine)}. */ public Value createStringValue(short type, String value, CSSEngine engine) throws DOMException { if (type == CSSPrimitiveValue.CSS_IDENT) { if (value.equalsIgnoreCase(CSSConstants.CSS_NONE_VALUE)) { return SVGValueConstants.NONE_VALUE; } throw createInvalidIdentifierDOMException(value); } if (type == CSSPrimitiveValue.CSS_URI) { return new URIValue(value, resolveURI(engine.getCSSBaseURI(), value)); } throw createInvalidStringTypeDOMException(type); } }
/** * Implements {@link ValueManager#createValue(LexicalUnit,CSSEngine)}. */ public Value createValue(LexicalUnit lu, CSSEngine engine) throws DOMException { switch (lu.getLexicalUnitType()) { case LexicalUnit.SAC_INHERIT: return SVGValueConstants.INHERIT_VALUE; case LexicalUnit.SAC_URI: return new URIValue(lu.getStringValue(), resolveURI(engine.getCSSBaseURI(), lu.getStringValue())); case LexicalUnit.SAC_IDENT: if (lu.getStringValue().equalsIgnoreCase (CSSConstants.CSS_NONE_VALUE)) { return SVGValueConstants.NONE_VALUE; } throw createInvalidIdentifierDOMException(lu.getStringValue()); } throw createInvalidLexicalUnitDOMException(lu.getLexicalUnitType()); }
/** * Implements {@link * ValueManager#createStringValue(short,String,CSSEngine)}. */ public Value createStringValue(short type, String value, CSSEngine engine) throws DOMException { if (type == CSSPrimitiveValue.CSS_IDENT) { if (value.equalsIgnoreCase(CSSConstants.CSS_NONE_VALUE)) { return SVGValueConstants.NONE_VALUE; } throw createInvalidIdentifierDOMException(value); } if (type == CSSPrimitiveValue.CSS_URI) { return new URIValue(value, resolveURI(engine.getCSSBaseURI(), value)); } throw createInvalidStringTypeDOMException(type); } }