/** * Creates an RGB color. */ protected Value createRGBColor(Value r, Value g, Value b) { return new RGBColorValue(r, g, b); }
/** * Creates an RGB color. */ protected Value createRGBColor(Value r, Value g, Value b) { return new RGBColorValue(r, g, b); }
/** * Creates an RGB color. */ protected Value createRGBColor(Value r, Value g, Value b) { return new RGBColorValue(r, g, b); }
/** * 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); }