Package org.pentaho.reporting.libraries.css.resolver

Examples of org.pentaho.reporting.libraries.css.resolver.FunctionEvaluationException


      throws FunctionEvaluationException
  {
    final CSSValue[] params = function.getParameters();
    if (params.length < 2)
    {
      throw new FunctionEvaluationException
          ("The parsed attr() function needs at least two parameters.");
    }
    final String namespace = FunctionUtilities.resolveString(layoutProcess, element, params[0]);
    final String name = FunctionUtilities.resolveString(layoutProcess, element, params[1]);
View Full Code Here


                                    final String type)
      throws FunctionEvaluationException
  {
    if (value instanceof CSSValue)
    {
      throw new FunctionEvaluationException();
    }

    if (value instanceof String)
    {
      final String strVal = (String) value;
      if ("length".equals(type))
      {
        final CSSNumericValue cssNumericValue = FunctionUtilities.parseNumberValue(strVal);
        return new StaticTextToken(cssNumericValue.getCSSText());
      }
      else if ("url".equals(type))
      {
        final CSSResourceValue cssResourceValue = FunctionUtilities.loadResource(layoutProcess, strVal);
        final Resource resource = cssResourceValue.getValue();
        return new ResourceContentToken(resource);
      }
      else if ("color".equals(type))
      {
        final CSSValue colorValue = ColorUtil.parseColor(strVal);
        if (colorValue == null)
        {
          throw new FunctionEvaluationException();
        }
        return new StaticTextToken(colorValue.getCSSText());
      }
      else
      {
View Full Code Here

      throws FunctionEvaluationException
  {
    final CSSValue[] parameters = function.getParameters();
    if (parameters.length == 0)
    {
      throw new FunctionEvaluationException
          ("One parameter must be given to the 'pending' function.");
    }

    final String name = FunctionUtilities.resolveString
        (layoutProcess, element, parameters[0]);
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.css.resolver.FunctionEvaluationException

Copyright © 2018 www.massapicom. 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.