Package org.pentaho.reporting.libraries.css.counter

Examples of org.pentaho.reporting.libraries.css.counter.CounterStyle


  }

  public String getText()
  {
    final CountersToken counterToken = getParent();
    final CounterStyle style = counterToken.getStyle();
    final String separator = counterToken.getSeparator();
    final StringBuffer buffer = new StringBuffer();

    for (int i = 0; i < counterValues.length; i++)
    {
      if (i != 0)
      {
        buffer.append(separator);
      }
      final int value = counterValues[i];
      buffer.append(style.getCounterValue(value));
    }

    return buffer.toString();
  }
View Full Code Here


  }

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

      throw new FunctionEvaluationException();
    }
    final String counterName =
            FunctionUtilities.resolveString(layoutProcess, element, params[0]);

    CounterStyle cstyle = null;
    if (params.length > 1)
    {
      final String styleName =
              FunctionUtilities.resolveString(layoutProcess, element, params[1]);
      cstyle = CounterStyleFactory.getInstance().getCounterStyle(styleName);
View Full Code Here

    final String counterName =
            FunctionUtilities.resolveString(layoutProcess, element, params[0]);
    final String separator =
            FunctionUtilities.resolveString(layoutProcess, element, params[1]);

    CounterStyle cstyle = null;
    if (params.length > 2)
    {
      final String styleName =
              FunctionUtilities.resolveString(layoutProcess, element, params[2]);
      cstyle = CounterStyleFactory.getInstance().getCounterStyle(styleName);
View Full Code Here

  private ContentToken resolveContentAlias (final CSSValue content)
  {

    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});
      }
      else
View Full Code Here

  private ContentToken resolveContentAlias(final CSSValue content)
  {

    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

TOP

Related Classes of org.pentaho.reporting.libraries.css.counter.CounterStyle

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.