Search in sources :

Example 1 with ColorValue

use of javax.swing.text.html.CSS.ColorValue in project jdk8u_jdk by JetBrains.

the class CSSBorder method getBorderColor.

/**
     * Return the border color for the given side.
     */
private Color getBorderColor(int side) {
    Object o = attrs.getAttribute(ATTRIBUTES[COLOR][side]);
    ColorValue cv;
    if (o instanceof ColorValue) {
        cv = (ColorValue) o;
    } else {
        // Marker for the default value.  Use 'color' property value as the
        // computed value of the 'border-color' property (CSS2 8.5.2)
        cv = (ColorValue) attrs.getAttribute(Attribute.COLOR);
        if (cv == null) {
            cv = (ColorValue) PARSERS[COLOR].parseCssValue(Attribute.COLOR.getDefaultValue());
        }
    }
    return cv.getValue();
}
Also used : ColorValue(javax.swing.text.html.CSS.ColorValue)

Aggregations

ColorValue (javax.swing.text.html.CSS.ColorValue)1