Examples of CSSStringValue


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

      throw new IllegalArgumentException("No valid font family specified.");
    }
    final String fontName;
    if (fontFamily instanceof CSSStringValue)
    {
      final CSSStringValue svalue = (CSSStringValue) fontFamily;
      fontName = svalue.getValue();
    }
    else
    {
      fontName = fontFamily.getCSSText();
    }
View Full Code Here

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

      {
        contentList.add(new CSSConstant(parameters.getStringValue()));
      }
      else if (parameters.getLexicalUnitType() == LexicalUnit.SAC_STRING_VALUE)
      {
        contentList.add(new CSSStringValue(CSSStringType.STRING,
            parameters.getStringValue()));
      }
      else if (CSSValueFactory.isNumericValue(parameters))
      {
        final CSSNumericValue numericValue =
            CSSValueFactory.createNumericValue(parameters);
        if (numericValue == null)
        {
          return null;
        }
        contentList.add(numericValue);
      }
      else if (CSSValueFactory.isLengthValue(parameters))
      {
        final CSSNumericValue lengthValue =
            CSSValueFactory.createLengthValue(parameters);
        if (lengthValue == null)
        {
          return null;
        }
        contentList.add(lengthValue);
      }
      else if (parameters.getLexicalUnitType() == LexicalUnit.SAC_ATTR)
      {
        final CSSAttrFunction attrFn =
            CSSValueFactory.parseAttrFunction(parameters);
        if (attrFn == null)
        {
          return null;
        }
        contentList.add(attrFn);
      }
      else if (parameters.getLexicalUnitType() == LexicalUnit.SAC_URI)
      {
        final CSSStringValue uriValue = CSSValueFactory.createUriValue(
            parameters);
        if (uriValue == null)
        {
          return null;
        }
View Full Code Here

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

    {
      return null;
    }

    final String uri = value.getStringValue();
    return new CSSStringValue(CSSStringType.URI, uri);
  }
View Full Code Here

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

                                    final LayoutElement element,
                                    final CSSValue content)
  {
    if (content instanceof CSSStringValue)
    {
      final CSSStringValue sval = (CSSStringValue) content;
      if (CSSStringType.STRING.equals(sval.getType()))
      {
        return new StaticTextToken(sval.getValue());
      }
      else
      {
        // this is an external URL, so try to load it.
        final CSSFunctionValue function = new CSSFunctionValue
View Full Code Here

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

        final CSSResourceValue refValue = (CSSResourceValue) value;
        return new ResourceContentToken(refValue.getValue());
      }
      else if (value instanceof CSSStringValue)
      {
        final CSSStringValue strval = (CSSStringValue) value;
        return new StaticTextToken(strval.getValue());
      }
      else if (value instanceof CSSRawValue)
      {
        final CSSRawValue rawValue = (CSSRawValue) value;
        return new ExternalContentToken(rawValue.getValue());
View Full Code Here

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

                      final LayoutElement currentNode,
                      final StyleKey key)
  {
    final LayoutStyle layoutContext = currentNode.getLayoutStyle();
    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, "..");
    }
    if (blockEllipsis == null)
    {
      blockEllipsis = new CSSStringValue(CSSStringType.STRING, "..");
    }

    layoutContext.setValue(TextStyleKeys.X_BLOCK_TEXT_OVERFLOW_ELLIPSIS, blockEllipsis);
    layoutContext.setValue(TextStyleKeys.X_LINE_TEXT_OVERFLOW_ELLIPSIS, lineEllipsis);
  }
View Full Code Here

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

    if (value instanceof CSSStringValue == false)
    {
      throw new FunctionEvaluationException
              ("Not even remotely an URI: " + value);
    }
    final CSSStringValue strval = (CSSStringValue) value;
    final CSSResourceValue cssResourceValue =
            FunctionUtilities.loadResource(layoutProcess, strval.getValue());
    final Resource resource = cssResourceValue.getValue();
    return new ResourceContentToken(resource);
  }
View Full Code Here

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

                                    final LayoutElement element,
                                    final CSSValue content)
  {
    if (content instanceof CSSStringValue)
    {
      final CSSStringValue sval = (CSSStringValue) content;
      if (CSSStringType.STRING.equals(sval.getType()))
      {
        return new StaticTextToken(sval.getValue());
      }
      else
      {
        // this is an external URL, so try to load it.
        final CSSFunctionValue function = new CSSFunctionValue
View Full Code Here

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

        final CSSResourceValue refValue = (CSSResourceValue) value;
        return new ResourceContentToken(refValue.getValue());
      }
      else if (value instanceof CSSStringValue)
      {
        final CSSStringValue strval = (CSSStringValue) value;
        return new StaticTextToken(strval.getValue());
      }
      else if (value instanceof CSSRawValue)
      {
        final CSSRawValue rawValue = (CSSRawValue) value;
        return new ExternalContentToken(rawValue.getValue());
View Full Code Here

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

    tokenMapping.put(ContentValues.OPEN_QUOTE, new OpenQuoteToken(false));
    tokenMapping.put(ContentValues.NO_OPEN_QUOTE, new OpenQuoteToken(true));
    tokenMapping.put(ContentValues.CLOSE_QUOTE, new CloseQuoteToken(false));
    tokenMapping.put(ContentValues.NO_CLOSE_QUOTE, new CloseQuoteToken(true));

    final CSSStringValue param =
        new CSSStringValue(CSSStringType.STRING, "list-item");
    listCounter = new CSSFunctionValue("counter", new CSSValue[]{param});

  }
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.