Examples of CounterStyle


Examples of org.jfree.layouting.layouter.counters.CounterStyle

    final CSSValue value = layoutContext.getValue(key);
    final ListSpecification lspec =
            currentNode.getLayoutContext().getListSpecification();
    if (ListStyleTypeOther.NORMAL.equals(value))
    {
      final CounterStyle cstyle =
              process.getDocumentContext().getCounterStyle ("list-item");
      lspec.setCounterStyle(cstyle);
    }
    else
    {
View Full Code Here

Examples of org.jfree.layouting.layouter.counters.CounterStyle

    else if (resolvedToken instanceof ResolvedCounterToken)
    {
      final ResolvedCounterToken ct = (ResolvedCounterToken) resolvedToken;
      final CounterToken parent = ct.getParent();
      final String name = parent.getName();
      final CounterStyle style = parent.getStyle();
      final CSSValue counterPolicy = documentContext.getCounterPolicy(name);
      final Integer counterValue = pageContext.getCounter(name, counterPolicy);
      return style.getCounterValue(counterValue.intValue());
    }

    return resolvedToken.getText();
  }
View Full Code Here

Examples of org.jfree.layouting.layouter.counters.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

Examples of org.jfree.layouting.layouter.counters.CounterStyle

    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

Examples of org.jfree.layouting.layouter.counters.CounterStyle

      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

Examples of org.jfree.layouting.layouter.counters.CounterStyle

    counterStyles.put(counterName, style);
  }

  public CounterStyle getCounterStyle(final String counterName)
  {
    final CounterStyle style = (CounterStyle) counterStyles.get(counterName);
    if (style == null)
    {
      return new DecimalCounterStyle();
    }
    return style;
View Full Code Here

Examples of org.jfree.layouting.layouter.counters.CounterStyle

  }

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

Examples of org.jfree.layouting.layouter.counters.CounterStyle

    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

Examples of org.jfree.layouting.layouter.counters.CounterStyle

  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

Examples of org.jfree.layouting.layouter.counters.CounterStyle

  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
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.