Examples of StyleMap


Examples of org.apache.flex.forks.batik.css.engine.StyleMap

        for (;;) {
            Value colorDef =
                CSSUtilities.getComputedStyle(paintElement, pidx);

            // Was solid-color explicity set on this element?
            StyleMap sm =
                ((CSSStylableElement)paintElement).getComputedStyleMap(null);
            if (!sm.isNullCascaded(pidx)) {
                // It was explicit...
                if (colorDef.getCssValueType() ==
                    CSSValue.CSS_PRIMITIVE_VALUE) {
                    return PaintServer.convertColor(colorDef, opacity);
                } else {
View Full Code Here

Examples of org.apache.flex.forks.batik.css.engine.StyleMap

            (element, SVGCSSEngine.TEXT_DECORATION_INDEX);

        TextPaintInfo pi = new TextPaintInfo(parentTPI);

        // Was text-decoration explicity set on this element?
        StyleMap sm = ((CSSStylableElement)element).getComputedStyleMap(null);
        if ((sm.isNullCascaded(SVGCSSEngine.TEXT_DECORATION_INDEX)) &&
            (sm.isNullCascaded(SVGCSSEngine.FILL_INDEX)) &&
            (sm.isNullCascaded(SVGCSSEngine.STROKE_INDEX)) &&
            (sm.isNullCascaded(SVGCSSEngine.STROKE_WIDTH_INDEX)) &&
            (sm.isNullCascaded(SVGCSSEngine.OPACITY_INDEX))) {
            // If not, keep the same decorations.
            return pi;
        }

        setBaseTextPaintInfo(pi, element, node, ctx);

        if (!sm.isNullCascaded(SVGCSSEngine.TEXT_DECORATION_INDEX))
            setDecorationTextPaintInfo(pi, element);

        return pi;
    }
View Full Code Here

Examples of org.apache.flex.forks.batik.css.engine.StyleMap

        super(familyName);
    }

    public static CSSFontFace createCSSFontFace(CSSEngine eng,
                                                FontFaceRule ffr) {
        StyleMap sm = ffr.getStyleMap();
        String familyName = getStringProp
            (sm, eng, SVGCSSEngine.FONT_FAMILY_INDEX);

        CSSFontFace ret = new CSSFontFace(familyName);

        Value v;
        v = sm.getValue(SVGCSSEngine.FONT_WEIGHT_INDEX);
        if (v != null)
            ret.fontWeight = v.getCssText();
        v = sm.getValue(SVGCSSEngine.FONT_STYLE_INDEX);
        if (v != null)
            ret.fontStyle = v.getCssText();
        v = sm.getValue(SVGCSSEngine.FONT_VARIANT_INDEX);
        if (v != null)
            ret.fontVariant = v.getCssText();
        v = sm.getValue(SVGCSSEngine.FONT_STRETCH_INDEX);
        if (v != null)
            ret.fontStretch = v.getCssText();
        v = sm.getValue(SVGCSSEngine.SRC_INDEX);
       
        ParsedURL base = ffr.getURL();
        if ((v != null) && (v != ValueConstants.NONE_VALUE)) {
            if (v.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) {
                ret.srcs = new LinkedList();
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.style.StyleMap

    StyleContext styleContext = imageContext.getStyleContext();
    StyleProvider provider = styleContext.getStyleProvider();
    if (provider != null)
    {
      // Get the StyleMap
      StyleMap map = provider.getStyleMap(styleContext);

      if (map != null)
      {
        // Derive the style name to use from the font name.
        Font font = context.getPaintFont();
        String name = _styleNamePrefix + font.getName();

        return map.getStyleByName(styleContext, name);
      }
    }

    return null;
  }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.style.StyleMap

      // If we don't get a background color from the inline
      // style, check the style class
      if ((background == null) && (entry.styleClass != null))
      {
        // We need to look up the style class in the style map
        StyleMap map = context.getStyleContext().getStyleMap();
        if (map != null)
        {
          StyleContext styleContext = context.getStyleContext();
          Style style = map.getStyleByClass(styleContext, entry.styleClass);

          background = _getBackground(style);
        }
      }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.style.StyleMap

    Object           className
    )
  {
    if (className != null)
    {
      StyleMap map = context.getStyleContext().getStyleMap();
      if (map != null)
      {
        return map.getStyleByClass(context.getStyleContext(),
                                   className.toString());
      }
    }

    return null;
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.style.StyleMap

    Object           styleSelector
    )
  {
    if (styleSelector != null)
    {
      StyleMap map = context.getStyleContext().getStyleMap();
      if (map != null)
      {
        return map.getStyleBySelector(context.getStyleContext(),
                                      styleSelector.toString());
      }
    }

    return null;
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.style.StyleMap

    String       styleID,
    ParsedPropertyKey key,
    boolean      isNamed
    )
  {
    StyleMap map = context.getStyleContext().getStyleMap();

    if (map == null)
    {
// =-=ags Don't log this condition for now.  The ImageGenerator doesn't
//        set up the StyleMap yet, so let's blow this off for now
//      _LOG.fine(_MAP_ERROR);
      return null;
    }

    Style style = null;

    if (isNamed)
      style = map.getStyleByName(context.getStyleContext(), styleID);
    else
      style = map.getStyleByClass(context.getStyleContext(), styleID);

    if (style == null)
    {
      if (_LOG.isFine())
        _LOG.fine(_STYLE_ERROR + styleID);
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.style.StyleMap

    // Check the af|menuTabs::separator style to see whether a non-zero width
    // is defined
    boolean doRenderSep = false;

    StyleMap styleMap = context.getStyleContext().getStyleMap();
    if (styleMap != null)
    {
      StyleContext styleContext = context.getStyleContext();
      Style style = styleMap.getStyleByClass(styleContext,
                                             AF_MENU_TABS_SEPARATOR_STYLE_CLASS);

      if (style != null)
      {
        String width = style.getProperty("width");
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.style.StyleMap

    )
  {
    if (name == null)
      return null;

    StyleMap map = context.getStyleContext().getStyleMap();
    if (map == null)
      return null;

    return map.getStyleByName(context.getStyleContext(), name);
  }
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.