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

Examples of org.pentaho.reporting.libraries.css.resolver.tokens.ContentToken


    }

    contentSpecification.setStrings(XAlternateTextResolveHandler.DEFAULT_CONTENT);
    if (value instanceof CSSAttrFunction)
    {
      final ContentToken token =
              evaluateFunction((CSSFunctionValue) value, process, element);
      if (token == null)
      {
        return;
      }
      contentSpecification.setStrings(new ContentToken[]{token});
    }

    if (value instanceof CSSValueList == false)
    {
      return; // cant handle that one
    }

    final ArrayList tokens = new ArrayList();
    final CSSValueList list = (CSSValueList) value;
    final int size = list.getLength();
    for (int i = 0; i < size; i++)
    {
      final CSSValueList sequence = (CSSValueList) list.getItem(i);
      for (int j = 0; j < sequence.getLength(); j++)
      {
        final CSSValue content = sequence.getItem(j);
        final ContentToken token = createToken(process, element, content);
        if (token == null)
        {
          // ok, a failure. Skip to the next content spec ...
          tokens.clear();
          break;
View Full Code Here


    }

    contentSpecification.setStrings(DEFAULT_CONTENT);
    if (value instanceof CSSAttrFunction)
    {
      final ContentToken token =
              evaluateFunction((CSSFunctionValue) value, process, element);
      if (token == null)
      {
        return;
      }
      contentSpecification.setStrings(new ContentToken[]{token});
    }

    if (value instanceof CSSValueList == false)
    {
      return; // cant handle that one
    }

    final ArrayList tokens = new ArrayList();
    final CSSValueList list = (CSSValueList) value;
    final int size = list.getLength();
    for (int i = 0; i < size; i++)
    {
      final CSSValueList sequence = (CSSValueList) list.getItem(i);
      for (int j = 0; j < sequence.getLength(); j++)
      {
        final CSSValue content = sequence.getItem(j);
        final ContentToken token = createToken(process, element, content);
        if (token == null)
        {
          // ok, a failure. Skip to the next content spec ...
          tokens.clear();
          break;
View Full Code Here

          return new StaticTextToken(url.toExternalForm());
        }
        return null;
      }

      final ContentToken token = (ContentToken) tokenMapping.get(content);
      if (token != null)
      {
        return token;
      }
View Full Code Here

    contentSpecification.setAllowContentProcessing(true);
    contentSpecification.setContents(DEFAULT_CONTENT);

    if (value instanceof CSSAttrFunction)
    {
      final ContentToken token = evaluateFunction((CSSFunctionValue) value, process, element);
      if (token == null)
      {
        return;
      }
      contentSpecification.setContents(new ContentToken[]{token});
    }

    if (value instanceof CSSValueList == false)
    {
      return; // cant handle that one
    }

    final ArrayList tokens = new ArrayList();
    final CSSValueList list = (CSSValueList) value;
    final int size = list.getLength();
    for (int i = 0; i < size; i++)
    {
      final CSSValueList sequence = (CSSValueList) list.getItem(i);
      for (int j = 0; j < sequence.getLength(); j++)
      {
        final CSSValue content = sequence.getItem(j);
        final ContentToken token = createToken(process, element, content);
        if (token == null)
        {
          // ok, a failure. Skip to the next content spec ...
          tokens.clear();
          break;
View Full Code Here

    final LayoutStyle layoutContext = element.getLayoutStyle();
    final CSSValue value =
        layoutContext.getValue(ListStyleKeys.LIST_STYLE_IMAGE);
    if (value != null)
    {
      final ContentToken token = createToken(process, element, value);
      if (token != null)
      {
        contentSpecification.setContents(new ContentToken[]{token});
        return;
      }
    }

    final ContentToken token = createToken(process, element, listCounter);
    if (token instanceof CounterToken)
    {
      final CounterToken counterToken = (CounterToken) token;
      final CounterStyle style = counterToken.getStyle();
      final String suffix = style.getSuffix();
View Full Code Here

            return new StaticTextToken(url.toExternalForm());
          }
          return null;
        }

        final ContentToken token = (ContentToken) tokenMapping.get(content);
        if (token != null)
        {
          return token;
        }
View Full Code Here

    final ContentSpecification contentSpecification =
        (ContentSpecification) layoutContext.getValue(InternalStyleKeys.INTERNAL_CONTENT);
    final ContentToken[] contents = contentSpecification.getContents();
    for (int i = 0; i < contents.length; i++)
    {
      ContentToken content = contents[i];
      if (content instanceof ResolvedCounterToken)
      {
        // this should not happen, as the resolving of content-tokens happens
        // after the style resolving process ..
        final ResolvedCounterToken computedToken = (ResolvedCounterToken) content;
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.css.resolver.tokens.ContentToken

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.