Examples of CSSStyleDeclaration


Examples of org.w3c.dom.css.CSSStyleDeclaration

        (Element e, String pe, URL buri, CSSOMReadOnlyStyleDeclaration rd) {
  if ((pe == null || pe.equals("")) &&
      e instanceof ElementNonCSSPresentationalHints) {
      ElementNonCSSPresentationalHints elt;
      elt = (ElementNonCSSPresentationalHints)e;
      CSSStyleDeclaration nonCSSDecl;
            nonCSSDecl = elt.getNonCSSPresentationalHints();
      if (nonCSSDecl != null) {
    int len = nonCSSDecl.getLength();
    for (int i = 0; i < len; i++) {
        setAuthorProperty(nonCSSDecl.item(i), nonCSSDecl, buri, rd);
    }
      }
  }
    }
View Full Code Here

Examples of org.w3c.dom.css.CSSStyleDeclaration

            }
            authorRules = sortRules(authorRules, e, pe);
            for (int i = 0; i < authorRules.getLength(); i++) {
                CSSOMStyleRule rule = (CSSOMStyleRule)authorRules.item(i);
                URL baseURI = rule.getBaseURI();
                CSSStyleDeclaration decl = rule.getStyle();
                int len = decl.getLength();
                for (int j = 0; j < len; j++) {
                    setAuthorProperty(decl.item(j), decl, baseURI, rd);
                }
            }
  } catch (DOMException ex) {
            throw CSSDOMExceptionFactory.createDOMException
                (ex.code, "style.sheet",
View Full Code Here

Examples of org.w3c.dom.css.CSSStyleDeclaration

                if (pe == null || pe.equals("") ||
                    e instanceof ExtendedElementCSSInlineStyle) {
                    hasStyle = ((ExtendedElementCSSInlineStyle)e).hasStyle();
                }
                if (hasStyle) {
                    CSSStyleDeclaration inlineDecl;
                    inlineDecl = ((ElementCSSInlineStyle)e).getStyle();
                    int len = inlineDecl.getLength();
                    for (int i = 0; i < len; i++) {
                        setAuthorProperty(inlineDecl.item(i), inlineDecl, buri, rd);
                    }
                }
            }
  } catch (DOMException ex) {
            throw CSSDOMExceptionFactory.createDOMException
View Full Code Here

Examples of org.w3c.dom.css.CSSStyleDeclaration

     * @param buri The base uri, if any.
     * @param rd The result style declaration.
     */
    protected void addOverrideStyleProperties
        (Element e, String pe, URL buri, CSSOMReadOnlyStyleDeclaration rd) {
  CSSStyleDeclaration overrideDecl;
  overrideDecl = ((DocumentCSS)document).getOverrideStyle(e, pe);
  if ((pe == null || pe.equals("")) &&
      overrideDecl != null) {
      int len = overrideDecl.getLength();
      for (int i = 0; i < len; i++) {
    setAuthorProperty(overrideDecl.item(i), overrideDecl, buri, rd);
      }
  }
    }
View Full Code Here

Examples of org.w3c.dom.css.CSSStyleDeclaration

        if (ve == null) {
            return "";
        }
        if (ve.value == null) { // ||
            //ve.value.getImmutableValue() == ImmutableInherit.INSTANCE) {
            CSSStyleDeclaration sd;
            sd = viewCSS.getComputedStyle(parentElement, null);
            return sd.getPropertyCSSValue(s).getCssText();
        } else {
            return ve.value.getCssText();
        }
    }
View Full Code Here

Examples of org.w3c.dom.css.CSSStyleDeclaration

  ValueEntry ve = properties.get(s);
        if (ve == null) {
            return null;
        }
        if (ve.value == null) {
            CSSStyleDeclaration sd;
            sd = viewCSS.getComputedStyle(parentElement, null);
            CSSOMReadOnlyValue v =
                (CSSOMReadOnlyValue)sd.getPropertyCSSValue(s);
            return ve.value = new CSSOMReadOnlyValue(v.getImmutableValue());
        } else {
            return ve.value;
        }
    }
View Full Code Here

Examples of org.w3c.dom.css.CSSStyleDeclaration

        if (ve == null) {
            return AUTHOR_ORIGIN;
        }
        if (ve.value == null) { // ||
            //ve.value.getImmutableValue() == ImmutableInherit.INSTANCE) {
            CSSStyleDeclaration sd;
            sd = viewCSS.getComputedStyle(parentElement, null);
            return ((CSSOMReadOnlyStyleDeclaration)
                    sd).getPropertyOrigin(s);
        } else {
            return ve.getOrigin();
View Full Code Here

Examples of org.w3c.dom.css.CSSStyleDeclaration

        if (ve == null) {
            return "";
        }
        if (ve.value == null) { // ||
            //ve.value.getImmutableValue() == ImmutableInherit.INSTANCE) {
            CSSStyleDeclaration sd;
            sd = viewCSS.getComputedStyle(parentElement, null);
            return ((CSSOMReadOnlyStyleDeclaration)
                    sd).getPropertyPriority(s);
        } else {
            return ve.getPriority();
View Full Code Here

Examples of org.w3c.dom.css.CSSStyleDeclaration

                    source = (Filter)filterMap.get(SVG_SOURCE_GRAPHIC_VALUE);
                    source = new FilterAlphaRable(source);
                }
            } else if (SVG_STROKE_PAINT_VALUE.equals(s)) {
                    // StrokePaint
                    CSSStyleDeclaration cssDecl
                        = CSSUtilities.getComputedStyle(filteredElement);
                    Paint paint = PaintServer.convertStrokePaint
                        (filteredElement,filteredNode, ctx);
                    // <!> FIXME: Should we create a transparent flood ???
                    source = new FloodRable8Bit(INFINITE_FILTER_REGION, paint);
            }
            break;
        case 15:
            if (s.charAt(10) == SVG_BACKGROUND_IMAGE_VALUE.charAt(10)) {
                if (SVG_BACKGROUND_IMAGE_VALUE.equals(s)) {
                    // BackgroundImage
                    source = new BackgroundRable8Bit(filteredNode);
                }
            } else if (SVG_BACKGROUND_ALPHA_VALUE.equals(s)) {
                // BackgroundAlpha
                source = new BackgroundRable8Bit(filteredNode);
                source = new FilterAlphaRable(source);
            }
            break;
        case 9:
            if (SVG_FILL_PAINT_VALUE.equals(s)) {
                // FillPaint
                CSSStyleDeclaration cssDecl
                    = CSSUtilities.getComputedStyle(filteredElement);
                Paint paint = PaintServer.convertFillPaint
                    (filteredElement,filteredNode, ctx);
                if (paint == null) {
                    paint = new Color(0, 0, 0, 0); // create a transparent flood
View Full Code Here

Examples of org.w3c.dom.css.CSSStyleDeclaration

    /**
     * Returns the translation of the non-CSS hints to the corresponding
     * CSS rules. The result can be null.
     */
    public static CSSStyleDeclaration getNonCSSPresentationalHints(Element elt) {
  CSSStyleDeclaration result = null;

        SVGDOMImplementation svgImpl;
        svgImpl = (SVGDOMImplementation)elt.getOwnerDocument().getImplementation();
        Set pa = svgImpl.getPresentionAttributeSet();
  NamedNodeMap nnm = elt.getAttributes();
  int len = nnm.getLength();
  for (int i = 0; i < len; i++) {
      Node attr = nnm.item(i);
      String an = attr.getNodeName();
      if (pa.contains(an)) {
    if (result == null) {
        DOMImplementation impl;
                    impl = elt.getOwnerDocument().getImplementation();
        CSSStyleDeclarationFactory f;
                    f = (CSSStyleDeclarationFactory)impl;
        result = f.createCSSStyleDeclaration();
    }
    result.setProperty(an, attr.getNodeValue(), "");
      }
  }
  return result;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.