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

Examples of org.pentaho.reporting.libraries.css.resolver.tokens.computed.CounterToken


    return parent;
  }

  public String getText()
  {
    final CounterToken counterToken = getParent();
    final CounterStyle style = counterToken.getStyle();
    return style.getCounterValue(counterValue);
  }
View Full Code Here


// todo: Create a global context ..
//      final DocumentContext documentContext = layoutProcess.getDocumentContext();
//      cstyle = documentContext.getCounterStyle(counterName);
      cstyle = new DecimalCounterStyle();
    }
    return new CounterToken(counterName, cstyle);
  }
View Full Code Here

    if (ContentValues.FOOTNOTE.equals(content))
    {
      final CounterStyle style =
              CounterStyleFactory.getInstance().getCounterStyle("normal");
      return new CounterToken("footnote", style);
    }
    if (ContentValues.ENDNOTE.equals(content))
    {
      final CounterStyle style =
              CounterStyleFactory.getInstance().getCounterStyle("normal");
      return new CounterToken("endnote", style);
    }
    if (ContentValues.SECTIONNOTE.equals(content))
    {
      final CounterStyle style =
              CounterStyleFactory.getInstance().getCounterStyle("normal");
      return new CounterToken("section-note", style);
    }
    if (ContentValues.LISTITEM.equals(content))
    {
      final CounterStyle style =
              CounterStyleFactory.getInstance().getCounterStyle("normal");
      return new CounterToken("list-item", style);
    }
    return null;
  }
View Full Code Here

    }

    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();
      if (suffix == null || suffix.length() == 0)
      {
        contentSpecification.setContents(new ContentToken[]{token});
      }
View Full Code Here

    if (ContentValues.FOOTNOTE.equals(content))
    {
      final CounterStyle style =
          CounterStyleFactory.getInstance().getCounterStyle("normal");
      return new CounterToken("footnote", style);
    }
    if (ContentValues.ENDNOTE.equals(content))
    {
      final CounterStyle style =
          CounterStyleFactory.getInstance().getCounterStyle("normal");
      return new CounterToken("endnote", style);
    }
    if (ContentValues.SECTIONNOTE.equals(content))
    {
      final CounterStyle style =
          CounterStyleFactory.getInstance().getCounterStyle("normal");
      return new CounterToken("section-note", style);
    }
    if (ContentValues.LISTITEM.equals(content))
    {
      final CounterStyle style =
          CounterStyleFactory.getInstance().getCounterStyle("normal");
      return new CounterToken("list-item", style);
    }
    return null;
  }
View Full Code Here

        content = computedToken.getParent();
      }

      if (content instanceof CounterToken)
      {
        final CounterToken counterToken = (CounterToken) content;
        if (counterToken.getName().equals(counter))
        {
          return true;
        }
      }
      else if (content instanceof CountersToken)
      {
        final CountersToken counterToken = (CountersToken) content;
        if (counterToken.getName().equals(counter))
        {
          return true;
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.css.resolver.tokens.computed.CounterToken

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.