/** * Returns the Value corresponding to the given system color. */ public static Value getSystemColor(String ident) { ident = ident.toLowerCase( ); // todo locale?? SystemColor sc = (SystemColor)factories.get(ident); return new RGBColorValue (new FloatValue(CSSPrimitiveValue.CSS_NUMBER, sc.getRed()), new FloatValue(CSSPrimitiveValue.CSS_NUMBER, sc.getGreen()), new FloatValue(CSSPrimitiveValue.CSS_NUMBER, sc.getBlue())); }
/** * Returns the Value corresponding to the given system color. */ public static Value getSystemColor(String ident) { ident = ident.toLowerCase( ); // todo locale?? SystemColor sc = (SystemColor)factories.get(ident); return new RGBColorValue (new FloatValue(CSSPrimitiveValue.CSS_NUMBER, sc.getRed()), new FloatValue(CSSPrimitiveValue.CSS_NUMBER, sc.getGreen()), new FloatValue(CSSPrimitiveValue.CSS_NUMBER, sc.getBlue())); }
/** * Returns the Value corresponding to the given system color. */ public static Value getSystemColor(String ident) { ident = ident.toLowerCase( ); // todo locale?? SystemColor sc = (SystemColor)factories.get(ident); return new RGBColorValue (new FloatValue(CSSPrimitiveValue.CSS_NUMBER, sc.getRed()), new FloatValue(CSSPrimitiveValue.CSS_NUMBER, sc.getGreen()), new FloatValue(CSSPrimitiveValue.CSS_NUMBER, sc.getBlue())); }
/** Get the Link Color to use in this document */ Value getLinkColor() { // Element body = DesignerService.getDefault().getBody(document); // Element body = InSyncService.getProvider().getHtmlBodyForMarkupFile(InSyncService.getProvider().getFileObject(document)); UserAgent userAgent = getUserAgent(); Element body = userAgent == null ? null : userAgent.getHtmlBodyForDocument(document); if (body == null) { // XXX Is it OK? return new RGBColorValue (new FloatValue(CSSPrimitiveValue.CSS_NUMBER, 0), new FloatValue(CSSPrimitiveValue.CSS_NUMBER, 0), new FloatValue(CSSPrimitiveValue.CSS_NUMBER, 200)); } return getComputedStyle((CSSStylableElement)body, null, XhtmlCss.RAVELINKCOLOR_INDEX); }
/** * 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); } }
/** * 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); } }
public Value createFloatValue(short unitType, float floatValue, CSSEngine engine) throws DOMException { if (unitType == CSSPrimitiveValue.CSS_NUMBER) { return new FloatValue(unitType, floatValue); } throw createInvalidFloatTypeDOMException(unitType, engine); } }
/** * 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); } }
/** * 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); } }
/** * 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 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 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 type, float floatValue) throws DOMException { switch (type) { case CSSPrimitiveValue.CSS_DEG: case CSSPrimitiveValue.CSS_GRAD: case CSSPrimitiveValue.CSS_RAD: return new FloatValue(type, floatValue); } throw createInvalidFloatValueDOMException(floatValue); } }
/** * Implements {@link ValueManager#createFloatValue(short,float)}. */ public Value createFloatValue(short type, float floatValue) throws DOMException { switch (type) { case CSSPrimitiveValue.CSS_DEG: case CSSPrimitiveValue.CSS_GRAD: case CSSPrimitiveValue.CSS_RAD: return new FloatValue(type, floatValue); } throw createInvalidFloatValueDOMException(floatValue); } }
/** * Implements {@link ValueManager#createFloatValue(short,float)}. */ public Value createFloatValue(short type, float floatValue) throws DOMException { switch (type) { case CSSPrimitiveValue.CSS_DEG: case CSSPrimitiveValue.CSS_GRAD: case CSSPrimitiveValue.CSS_RAD: return new FloatValue(type, floatValue); } throw createInvalidFloatValueDOMException(floatValue); } }
/** * 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()); }
public Value createValue(LexicalUnit lu, CSSEngine engine) throws DOMException { switch (lu.getLexicalUnitType()) { case LexicalUnit.SAC_INHERIT: return CssValueConstants.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()); default: throw createInvalidLexicalUnitDOMException (lu.getLexicalUnitType(), engine); } }