public Value computeValue(CSSStylableElement elt, String pseudo, CSSEngine engine, int idx, StyleMap sm, Value value) { if (value == CssValueConstants.TRANSPARENT_VALUE) { return CssValueConstants.TRANSPARENT_RGB_VALUE; } return super.computeValue(elt, pseudo, engine, idx, sm, value); } }
private void expectNonNull(LexicalUnit lu) { if (lu == null) { throw createInvalidLexicalUnitDOMException((short)-1); } }
/** * Implements {@link ValueManager#createFloatValue(short,float)}. */ public Value createFloatValue(short unitType, float floatValue) throws DOMException { throw createDOMException(); }
private Value createICCColorValue(LexicalUnit lu, Value v) { lu = lu.getParameters(); expectIdent(lu); ICCColor icc = new ICCColor(lu.getStringValue()); lu = lu.getNextLexicalUnit(); while (lu != null) { expectComma(lu); lu = lu.getNextLexicalUnit(); icc.append(getColorValue(lu)); lu = lu.getNextLexicalUnit(); } return icc; }
/** * Implements {@link ValueManager#createValue(LexicalUnit,CSSEngine)}. */ public Value createValue(LexicalUnit lu, CSSEngine engine) throws DOMException { if (lu.getLexicalUnitType() == LexicalUnit.SAC_IDENT) { if (lu.getStringValue().equalsIgnoreCase (CSSConstants.CSS_AUTO_VALUE)) { return SVGValueConstants.AUTO_VALUE; } throw createInvalidIdentifierDOMException(lu.getStringValue()); } return super.createValue(lu, engine); }
/** {@inheritDoc} */ public String toString() { return getCssText(); } }
/** * 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#createFloatValue(short,float)}. */ public Value createFloatValue(short unitType, float floatValue) throws DOMException { if (unitType == CSSPrimitiveValue.CSS_NUMBER) { return new FloatValue(unitType, floatValue); } throw createInvalidFloatTypeDOMException(unitType); } }
private Value createICCColorValue(LexicalUnit lu, Value v) { lu = lu.getParameters(); expectIdent(lu); ICCColor icc = new ICCColor(lu.getStringValue()); lu = lu.getNextLexicalUnit(); while (lu != null) { expectComma(lu); lu = lu.getNextLexicalUnit(); icc.append(getColorValue(lu)); lu = lu.getNextLexicalUnit(); } return icc; }
private void expectNonNull(LexicalUnit lu) { if (lu == null) { throw createInvalidLexicalUnitDOMException((short)-1); } }
/** * Implements {@link ValueManager#createFloatValue(short,float)}. */ public Value createFloatValue(short unitType, float floatValue) throws DOMException { throw createDOMException(); }
/** {@inheritDoc} */ public String toString() { return getCssText(); } }
private Value createICCColorValue(LexicalUnit lu, Value v) { lu = lu.getParameters(); expectIdent(lu); ICCColor icc = new ICCColor(lu.getStringValue()); lu = lu.getNextLexicalUnit(); while (lu != null) { expectComma(lu); lu = lu.getNextLexicalUnit(); icc.append(getColorValue(lu)); lu = lu.getNextLexicalUnit(); } return icc; }
private void expectNonNull(LexicalUnit lu) { if (lu == null) { throw createInvalidLexicalUnitDOMException((short)-1); } }
/** * Implements {@link ValueManager#createFloatValue(short,float)}. */ public Value createFloatValue(short unitType, float floatValue) throws DOMException { throw createDOMException(); }
/** {@inheritDoc} */ public String toString() { return getCssText(); } }
private void expectComma(LexicalUnit lu) { if (lu.getLexicalUnitType() != LexicalUnit.SAC_OPERATOR_COMMA) { throw createInvalidLexicalUnitDOMException (lu.getLexicalUnitType()); } }
private void expectIdent(LexicalUnit lu) { if (lu.getLexicalUnitType() != LexicalUnit.SAC_IDENT) { throw createInvalidLexicalUnitDOMException (lu.getLexicalUnitType()); } }
private void expectComma(LexicalUnit lu) { if (lu.getLexicalUnitType() != LexicalUnit.SAC_OPERATOR_COMMA) { throw createInvalidLexicalUnitDOMException (lu.getLexicalUnitType()); } }
private void expectIdent(LexicalUnit lu) { if (lu.getLexicalUnitType() != LexicalUnit.SAC_IDENT) { throw createInvalidLexicalUnitDOMException (lu.getLexicalUnitType()); } }