Examples of CounterToken


Examples of org.jfree.layouting.layouter.content.computed.CounterToken

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

Examples of org.jfree.layouting.layouter.content.computed.CounterToken

          currentElement.getString(variableToken.getVariable());
      return new ResolvedStringToken(variableToken, resolvedText);
    }
    else if (token instanceof CounterToken)
    {
      final CounterToken counterToken = (CounterToken) token;
      final String name = counterToken.getName();
      final int counterValue = currentElement.getCounterValue(name);
      return new ResolvedCounterToken(counterToken, counterValue);
    }
    else if (token instanceof CountersToken)
    {
      final CountersToken counterToken = (CountersToken) token;
      final String name = counterToken.getName();
      final IntList counterValues = new IntList(10);
      while (currentElement != null)
      {
        if (currentElement.isCounterDefined(name))
        {
View Full Code Here

Examples of org.jfree.layouting.layouter.content.computed.CounterToken

    if (cstyle == null)
    {
      final DocumentContext documentContext = layoutProcess.getDocumentContext();
      cstyle = documentContext.getCounterStyle(counterName);
    }
    return new CounterToken(counterName, cstyle);
  }
View Full Code Here

Examples of org.jfree.layouting.layouter.content.computed.CounterToken

    return parent;
  }

  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.content.computed.CounterToken

    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.content.computed.CounterToken

    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

Examples of org.jfree.layouting.layouter.content.computed.CounterToken

    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.content.computed.CounterToken

        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

Examples of org.jfree.layouting.layouter.content.computed.CounterToken

          currentElement.getString(variableToken.getVariable());
      return new ResolvedStringToken(variableToken, resolvedText);
    }
    else if (token instanceof CounterToken)
    {
      final CounterToken counterToken = (CounterToken) token;
      final String name = counterToken.getName();
      final int counterValue = currentElement.getCounterValue(name);
      return new ResolvedCounterToken(counterToken, counterValue);
    }
    else if (token instanceof CountersToken)
    {
      final CountersToken counterToken = (CountersToken) token;
      final String name = counterToken.getName();
      final IntList counterValues = new IntList(10);
      while (currentElement != null)
      {
        if (currentElement.isCounterDefined(name))
        {
View Full Code Here

Examples of org.jfree.layouting.layouter.content.computed.CounterToken

    return parent;
  }

  public String getText()
  {
    final CounterToken counterToken = getParent();
    final CounterStyle style = counterToken.getStyle();
    return style.getCounterValue(counterValue);
  }
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.