Examples of CSSValueList


Examples of org.pentaho.reporting.libraries.css.values.CSSValueList

    final CSSValue value = layoutContext.getValue(key);
    CSSStringValue lineEllipsis = null;
    CSSStringValue blockEllipsis = null;
    if (value instanceof CSSValueList)
    {
      final CSSValueList vlist = (CSSValueList) value;
      if (vlist.getLength() == 2)
      {
        lineEllipsis = filterString(vlist.getItem(0));
        blockEllipsis = filterString(vlist.getItem(1));
      }
      else if (vlist.getLength() == 1)
      {
        lineEllipsis = filterString(vlist.getItem(0));
        blockEllipsis = filterString(vlist.getItem(0));
      }
    }
    if (lineEllipsis == null)
    {
      lineEllipsis = new CSSStringValue(CSSStringType.STRING, "..");
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.values.CSSValueList

    if (value instanceof CSSValueList == false)
    {
      return; // do nothing.
    }

    final CSSValueList valueList = (CSSValueList) value;
    for (int i = 0; i < valueList.getLength(); i++)
    {
      final CSSValue item = valueList.getItem(i);
      if (item instanceof CSSConstant == false)
      {
        continue;
      }
      element.getStrings().put(item.getCSSText(), element.getStrings().get(item.getCSSText()));
View Full Code Here

Examples of org.w3c.dom.css.CSSValueList

                       TextAttribute.WIDTH_REGULAR);
        }


        // Font family
        CSSValueList ff = (CSSValueList)cssDecl.getPropertyCSSValueInternal
            (CSS_FONT_FAMILY_PROPERTY);

        //  make a list of GVTFontFamily objects
        Vector fontFamilyList = new Vector();
        for (int i = 0; i < ff.getLength(); i++) {
            v = (CSSPrimitiveValue)ff.item(i);
            String fontFamilyName = v.getStringValue();
            GVTFontFamily fontFamily
                = SVGFontUtilities.getFontFamily(element, ctx, fontFamilyName,
                   fontWeightString, fontStyleString);
            fontFamilyList.add(fontFamily);
View Full Code Here

Examples of org.w3c.dom.css.CSSValueList

        if (t == CSSValue.CSS_VALUE_LIST) {

            // first check to see if its a valid list,
            // ie. if it contains none then that is the only element
            CSSValueList lst = (CSSValueList)cssVal;

            Paint paint = PaintServer.convertFillPaint(element, node, ctx);
            Paint strokePaint = PaintServer.convertStrokePaint(element, node, ctx);
            Stroke stroke = PaintServer.convertStroke(element, ctx);

            for (int i = 0; i < lst.getLength(); i++) {
                CSSPrimitiveValue v = (CSSPrimitiveValue)lst.item(i);
                String s = v.getStringValue();
                switch (s.charAt(0)) {
                case 'u':
                    if (paint != null) {
                       textDecoration.underlinePaint = paint;
View Full Code Here

Examples of org.w3c.dom.css.CSSValueList

    public static
        float [] convertStrokeDasharray(CSSValue v,
                                        UnitProcessor.Context uctx) {
        float [] dasharray = null;
        if (v.getCssValueType() == CSSValue.CSS_VALUE_LIST) {
            CSSValueList l = (CSSValueList)v;
            int length = l.getLength();
            dasharray = new float[length];
            float sum = 0;
            for (int i=0; i < dasharray.length; ++i) {
                CSSValue vv = l.item(i);
                float dash = UnitProcessor.cssOtherLengthToUserSpace
                    (vv, CSS_STROKE_DASHARRAY_PROPERTY, uctx);
                dasharray[i] = dash;
                sum += dash;
            }
View Full Code Here

Examples of org.w3c.dom.css.CSSValueList

        CSSValue v
            = decl.getPropertyCSSValueInternal(CSS_ENABLE_BACKGROUND_PROPERTY);
        if (v.getCssValueType() != v.CSS_VALUE_LIST) {
            return null; // accumulate
        }
        CSSValueList l = (CSSValueList)v;
        int length = l.getLength();
        switch (length) {
        case 1:
            return CompositeGraphicsNode.VIEWPORT; // new
        case 5: // new <x>,<y>,<width>,<height>
            v = l.item(1);
            float x = UnitProcessor.cssHorizontalCoordinateToUserSpace
                (v, CSS_ENABLE_BACKGROUND_PROPERTY, uctx);
            v = l.item(2);
            float y = UnitProcessor.cssVerticalCoordinateToUserSpace
                (v, CSS_ENABLE_BACKGROUND_PROPERTY, uctx);
            v = l.item(3);
            float w = UnitProcessor.cssHorizontalLengthToUserSpace
                (v, CSS_ENABLE_BACKGROUND_PROPERTY, uctx);
            v = l.item(4);
            float h = UnitProcessor.cssVerticalLengthToUserSpace
                (v, CSS_ENABLE_BACKGROUND_PROPERTY, uctx);
            return new Rectangle2D.Float(x, y, w, h);
        default:
            // If more than zero but less than four of the values
View Full Code Here

Examples of org.w3c.dom.css.CSSValueList

   */
  public Object calculateCSSValueResult(CSSValue value, String propertyName,
      ICSSStyle style) {
    String[] decorations = null;
    if (value.getCssValueType() == CSSValue.CSS_VALUE_LIST) {
      CSSValueList valueList = (CSSValueList) value;
      decorations = new String[valueList.getLength()];
      for (int i = 0; i < decorations.length; i++) {
        decorations[i] = valueList.item(i).getCssText();
      }
    } else {
      decorations = new String[1];
      decorations[0] = value.getCssText();
    }
View Full Code Here

Examples of org.w3c.dom.css.CSSValueList

      if (intvalue >= 0) {
        return new int[] { intvalue, intvalue };
      }
            return INITIAL_SPACING;
    } else if (value.getCssValueType() == CSSValue.CSS_VALUE_LIST) {
      CSSValueList list = (CSSValueList) value;
      if (list.getLength() >= 2) {
        int i1 = toIntValue(list.item(0).getCssText(), style);
        int i2 = toIntValue(list.item(1).getCssText(), style);
        if (i1 < 0) {
          i1 = 0;
        }
        if (i2 < 0) {
          i2 = 0;
View Full Code Here

Examples of org.w3c.dom.css.CSSValueList

                       TextAttribute.WIDTH_REGULAR);
        }


        // Font family
        CSSValueList ff = (CSSValueList)cssDecl.getPropertyCSSValueInternal
            (CSS_FONT_FAMILY_PROPERTY);

        //  make a list of GVTFontFamily objects
        Vector fontFamilyList = new Vector();
        for (int i = 0; i < ff.getLength(); i++) {
            v = (CSSPrimitiveValue)ff.item(i);
            String fontFamilyName = v.getStringValue();
            GVTFontFamily fontFamily
                = SVGFontUtilities.getFontFamily(element, ctx, fontFamilyName,
                   fontWeightString, fontStyleString);
            fontFamilyList.add(fontFamily);
View Full Code Here

Examples of org.w3c.dom.css.CSSValueList

        if (t == CSSValue.CSS_VALUE_LIST) {

            // first check to see if its a valid list,
            // ie. if it contains none then that is the only element
            CSSValueList lst = (CSSValueList)cssVal;

            Paint paint = PaintServer.convertFillPaint(element, node, ctx);
            Paint strokePaint = PaintServer.convertStrokePaint(element, node, ctx);
            Stroke stroke = PaintServer.convertStroke(element, ctx);

            for (int i = 0; i < lst.getLength(); i++) {
                CSSPrimitiveValue v = (CSSPrimitiveValue)lst.item(i);
                String s = v.getStringValue();
                switch (s.charAt(0)) {
                case 'u':
                    if (paint != null) {
                       textDecoration.underlinePaint = paint;
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.