Examples of StaticTextToken


Examples of org.jfree.layouting.layouter.content.statics.StaticTextToken

      {

        CSSStringValue strval = (CSSStringValue) value;

        return new StaticTextToken(strval.getValue());

      }

      else if (value instanceof CSSRawValue)

      {

        CSSRawValue rawValue = (CSSRawValue) value;

        return new ExternalContentToken(rawValue.getValue());

      }

      return new StaticTextToken(value.getCSSText());

    }

    catch (FunctionEvaluationException e)
View Full Code Here

Examples of org.jfree.layouting.layouter.content.statics.StaticTextToken

        contentSpecification.setContents(new ContentToken[]{ token });
      }
      else
      {
        contentSpecification.setContents
            (new ContentToken[]{ counterToken, new StaticTextToken(suffix)});
      }
    }
    else
    {
      contentSpecification.setContents(new ContentToken[]{ token });
View Full Code Here

Examples of org.jfree.layouting.layouter.content.statics.StaticTextToken

      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
              ("url", new CSSValue[]{sval});
          return evaluateFunction(function, process, element);
        }
      }

      if (content instanceof CSSConstant)
      {
        if (ContentValues.DOCUMENT_URL.equals(content))
        {
          final Object docUrl = process.getDocumentContext().getMetaAttribute
              ("document-url");
          if (docUrl != null)
          {
            return new StaticTextToken(String.valueOf(docUrl));
          }

          final ResourceKey baseKey =
              DocumentContextUtility.getBaseResource(process.getDocumentContext());
          final ResourceManager resourceManager =
              DocumentContextUtility.getResourceManager(process.getDocumentContext());
          final URL url = resourceManager.toURL(baseKey);
          if (url != null)
          {
            return new StaticTextToken(url.toExternalForm());
          }
          return null;
        }

        final ContentToken token = (ContentToken) tokenMapping.get(content);
View Full Code Here

Examples of org.jfree.layouting.layouter.content.statics.StaticTextToken

    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
                ("url", new CSSValue[]{sval});
        return evaluateFunction(function, process, element);
      }
    }

    if (content instanceof CSSFunctionValue)
    {
      return evaluateFunction((CSSFunctionValue) content, process, element);
    }

    if (content instanceof CSSConstant)
    {
      if (ContentValues.DOCUMENT_URL.equals(content))
      {
        final Object docUrl = process.getDocumentContext().getMetaAttribute
                ("document-url");
        if (docUrl != null)
        {
          return new StaticTextToken(String.valueOf(docUrl));
        }

        final ResourceKey baseKey =
            DocumentContextUtility.getBaseResource(process.getDocumentContext());
        final ResourceManager resourceManager =
            DocumentContextUtility.getResourceManager(process.getDocumentContext());
        final URL url = resourceManager.toURL(baseKey);
        if (url != null)
        {
          return new StaticTextToken(url.toExternalForm());
        }
        return null;
      }
    }
    return null;
View Full Code Here

Examples of org.jfree.layouting.layouter.content.statics.StaticTextToken

        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());
      }
      return new StaticTextToken(value.getCSSText());
    }
    catch (FunctionEvaluationException e)
    {
      Log.debug ("Evaluation failed " + e);
      return null;
View Full Code Here

Examples of org.jfree.layouting.layouter.content.statics.StaticTextToken

    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
                ("url", new CSSValue[]{sval});
        return evaluateFunction(function, process, element);
      }
    }

    if (content instanceof CSSFunctionValue)
    {
      return evaluateFunction((CSSFunctionValue) content, process, element);
    }

    if (content instanceof CSSConstant)
    {
      if (ContentValues.DOCUMENT_URL.equals(content))
      {
        final Object docUrl = process.getDocumentContext().getMetaAttribute
                ("document-url");
        if (docUrl != null)
        {
          return new StaticTextToken(String.valueOf(docUrl));
        }

        final ResourceKey baseKey =
            DocumentContextUtility.getBaseResource(process.getDocumentContext());
        final ResourceManager resourceManager =
            DocumentContextUtility.getResourceManager(process.getDocumentContext());
        final URL url = resourceManager.toURL(baseKey);
        if (url != null)
        {
          return new StaticTextToken(url.toExternalForm());
        }
        return null;
      }

      final ContentToken token = (ContentToken) tokenMapping.get(content);
View Full Code Here

Examples of org.jfree.layouting.layouter.content.statics.StaticTextToken

        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());
      }
      return new StaticTextToken(value.getCSSText());
    }
    catch (FunctionEvaluationException e)
    {
      Log.debug ("Evaluation failed " + e);
      return null;
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.resolver.tokens.statics.StaticTextToken

    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
                ("url", new CSSValue[]{sval});
        return evaluateFunction(function, process, element);
      }
    }

    if (content instanceof CSSFunctionValue)
    {
      return evaluateFunction((CSSFunctionValue) content, process, element);
    }

    if (content instanceof CSSConstant)
    {
      if (ContentValues.DOCUMENT_URL.equals(content))
      {
        final ResourceKey baseKey = process.getContextKey();
        final ResourceManager resourceManager = process.getResourceManager();
        final URL url = resourceManager.toURL(baseKey);
        if (url != null)
        {
          return new StaticTextToken(url.toExternalForm());
        }
        return null;
      }
    }
    return null;
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.resolver.tokens.statics.StaticTextToken

        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());
      }
      return new StaticTextToken(value.getCSSText());
    }
    catch (FunctionEvaluationException e)
    {
      DebugLog.log("Evaluation failed " + e);
      return null;
View Full Code Here

Examples of org.pentaho.reporting.libraries.css.resolver.tokens.statics.StaticTextToken

    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
                ("url", new CSSValue[]{sval});
        return evaluateFunction(function, process, element);
      }
    }

    if (content instanceof CSSFunctionValue)
    {
      return evaluateFunction((CSSFunctionValue) content, process, element);
    }

    if (content instanceof CSSConstant)
    {
      if (ContentValues.DOCUMENT_URL.equals(content))
      {
        final ResourceKey baseKey = process.getContextKey();
        final ResourceManager resourceManager = process.getResourceManager();
        final URL url = resourceManager.toURL(baseKey);
        if (url != null)
        {
          return new StaticTextToken(url.toExternalForm());
        }
        return null;
      }

      final ContentToken token = (ContentToken) tokenMapping.get(content);
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.