Examples of StyleValueFunction


Examples of org.jfree.layouting.layouter.style.functions.values.StyleValueFunction

                                        final LayoutElement element)

  {

    StyleValueFunction styleFunction =

            FunctionFactory.getInstance().getStyleFunction(function.getFunctionName());

    try

    {

      CSSValue value = styleFunction.evaluate(process, element, function);

      if (value instanceof CSSResourceValue)

      {
View Full Code Here

Examples of org.jfree.layouting.layouter.style.functions.values.StyleValueFunction

      return value;
    }

    final CSSFunctionValue functionValue = (CSSFunctionValue) value;

    final StyleValueFunction function =
            FunctionFactory.getInstance().getStyleFunction
                    (functionValue.getFunctionName());
    if (function == null)
    {
      throw new FunctionEvaluationException
              ("Unsupported Function: " + functionValue);
    }
    return function.evaluate
            (layoutProcess, layoutElement, functionValue);
  }
View Full Code Here

Examples of org.jfree.layouting.layouter.style.functions.values.StyleValueFunction

  }

  public StyleValueFunction getStyleFunction (String name)
  {
    final StyleValueFunction function = (StyleValueFunction) styleFunctions.get(name.toLowerCase());
    if (function == null)
    {
      Log.warn ("Unrecognized style function encountered: " + name);
    }
    // todo: Check for null values in all callers ..
View Full Code Here

Examples of org.jfree.layouting.layouter.style.functions.values.StyleValueFunction

  private ContentToken evaluateFunction(final CSSFunctionValue function,
                                        final LayoutProcess process,
                                        final LayoutElement element)
  {
    final StyleValueFunction styleFunction =
            FunctionFactory.getInstance().getStyleFunction(function.getFunctionName());
    try
    {
      final CSSValue value = styleFunction.evaluate(process, element, function);
      if (value instanceof CSSResourceValue)
      {
        final CSSResourceValue refValue = (CSSResourceValue) value;
        return new ResourceContentToken(refValue.getValue());
      }
View Full Code Here

Examples of org.jfree.layouting.layouter.style.functions.values.StyleValueFunction

  private ContentToken evaluateFunction(final CSSFunctionValue function,
                                        final LayoutProcess process,
                                        final LayoutElement element)
  {
    final StyleValueFunction styleFunction =
            FunctionFactory.getInstance().getStyleFunction(function.getFunctionName());
    try
    {
      final CSSValue value = styleFunction.evaluate(process, element, function);
      if (value instanceof CSSResourceValue)
      {
        final CSSResourceValue refValue = (CSSResourceValue) value;
        return new ResourceContentToken(refValue.getValue());
      }
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.resolver.function.StyleValueFunction

  private ContentToken evaluateFunction(final CSSFunctionValue function,
                                        final DocumentContext process,
                                        final LayoutElement element)
  {
    final StyleValueFunction styleFunction =
            FunctionFactory.getInstance().getStyleFunction(function.getFunctionName());
    try
    {
      final CSSValue value = styleFunction.evaluate(process, element, function);
      if (value instanceof CSSResourceValue)
      {
        final CSSResourceValue refValue = (CSSResourceValue) value;
        return new ResourceContentToken(refValue.getValue());
      }
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.resolver.function.StyleValueFunction

  private ContentToken evaluateFunction(final CSSFunctionValue function,
                                        final DocumentContext process,
                                        final LayoutElement element)
  {
    final StyleValueFunction styleFunction =
            FunctionFactory.getInstance().getStyleFunction(function.getFunctionName());
    try
    {
      final CSSValue value = styleFunction.evaluate(process, element, function);
      if (value instanceof CSSResourceValue)
      {
        final CSSResourceValue refValue = (CSSResourceValue) value;
        return new ResourceContentToken(refValue.getValue());
      }
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.resolver.function.StyleValueFunction

    // it might as well be a RGB- or HSL- function.

    if (value instanceof CSSFunctionValue)
    {
      final CSSFunctionValue functionValue = (CSSFunctionValue) value;
      final StyleValueFunction function = FunctionFactory.getInstance().getStyleFunction
                      (functionValue.getFunctionName());
      if (function == null)
      {
        value = HtmlColors.BLACK;
      }
      else
      {
        try
        {
          value = function.evaluate(process, currentNode, functionValue);
        }
        catch (FunctionEvaluationException e)
        {
          value = HtmlColors.BLACK;
        }
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.resolver.function.StyleValueFunction

    if (value instanceof CSSFunctionValue)
    {
      // thats plain and simple - resolve it directly.
      final CSSFunctionValue functionValue = (CSSFunctionValue) value;
      final String name = functionValue.getFunctionName().toLowerCase();
      final StyleValueFunction o = (StyleValueFunction) functions.get(name);
      if (o == null)
      {
        throw new FunctionEvaluationException("No such function registered: " + name);
      }
      return o.evaluate(documentContext, element, (CSSFunctionValue) value);
    }
    else if (value instanceof CSSValueList)
    {
      final CSSValueList list = (CSSValueList) value;
      final int length = list.getLength();
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.