Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.fop.fo.pagination
Class PageNumberGenerator

    java.lang.Object
      org.apache.fop.fo.pagination.PageNumberGenerator

    public class PageNumberGenerator

extends java.lang.Object

This class uses the 'format', 'groupingSeparator', 'groupingSize', and 'letterValue' properties on fo:page-sequence to return a String corresponding to the supplied integer page number.

In addition, (now) uses 'language' parameter and new 'fox:page-number-features' parameter to express applicable language and number conversion features.

This work was authored by Glenn Adams (gadams@apache.org), based on a rewrite of prior work to use the new `NumberConverter` utility class.

See Also:
  `NumberConverter`

Constructor Summary
`PageNumberGenerator(java.lang.String format, int groupingSeparator, int groupingSize, int letterValue, java.lang.String features, java.lang.String language, java.lang.String country)` Main constructor.

Method Summary
`java.lang.String` | `makeFormattedPageNumber(int number)` Formats a page number.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PageNumberGenerator

    public PageNumberGenerator(java.lang.String format,
                               int groupingSeparator,
                               int groupingSize,
                               int letterValue,
                               java.lang.String features,
                               java.lang.String language,
                               java.lang.String country)

  Main constructor. For further information on the parameters see `NumberConverter`.

  Parameters:
    `format` - format for the page number (may be null or empty, which is treated as null)
    `groupingSeparator` - grouping separator (if zero, then no grouping separator applies)
    `groupingSize` - grouping size (if zero or negative, then no grouping size applies)
    `letterValue` - letter value
    `features` - features (feature sub-parameters)
    `language` - (may be null or empty, which is treated as null)
    `country` - (may be null or empty, which is treated as null)

Method Detail

### makeFormattedPageNumber

    public java.lang.String makeFormattedPageNumber(int number)

  Formats a page number.

  Parameters:
    `number` - page number to format
  Returns:
    the formatted page number as a String

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 1999-2012 The Apache Software Foundation. All Rights Reserved.