/** * Implements {@link ValueManager#createFloatValue(short,float)}. */ public Value createFloatValue(short type, float floatValue) throws DOMException { if (type == CSSPrimitiveValue.CSS_NUMBER) { return new FloatValue(type, floatValue); } throw createInvalidFloatTypeDOMException(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_INTEGER: return new FloatValue(CSSPrimitiveValue.CSS_NUMBER, lu.getIntegerValue()); case LexicalUnit.SAC_REAL: return new FloatValue(CSSPrimitiveValue.CSS_NUMBER, lu.getFloatValue()); } 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_INTEGER: return new FloatValue(CSSPrimitiveValue.CSS_NUMBER, lu.getIntegerValue()); case LexicalUnit.SAC_REAL: return new FloatValue(CSSPrimitiveValue.CSS_NUMBER, lu.getFloatValue()); } throw createInvalidLexicalUnitDOMException(lu.getLexicalUnitType()); }
/** * Implements {@link ValueManager#createFloatValue(short,float)}. */ public Value createFloatValue(short type, float floatValue) throws DOMException { if (type == CSSPrimitiveValue.CSS_NUMBER) { return new FloatValue(type, floatValue); } throw createInvalidFloatTypeDOMException(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_INTEGER: return new FloatValue(CSSPrimitiveValue.CSS_NUMBER, lu.getIntegerValue()); case LexicalUnit.SAC_REAL: return new FloatValue(CSSPrimitiveValue.CSS_NUMBER, lu.getFloatValue()); } throw createInvalidLexicalUnitDOMException(lu.getLexicalUnitType()); }
/** * Implements {@link ValueManager#createFloatValue(short,float)}. */ public Value createFloatValue(short type, float floatValue) throws DOMException { if (type == CSSPrimitiveValue.CSS_NUMBER) { return new FloatValue(type, floatValue); } throw createInvalidFloatTypeDOMException(type); } }