Package org.apache.fop.fo.pagination
Class PageNumberGenerator
java.lang.Object
org.apache.fop.fo.pagination.PageNumberGenerator
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:
-
Constructor Summary
ConstructorDescriptionPageNumberGenerator
(String format, int groupingSeparator, int groupingSize, int letterValue, String features, String language, String country) Main constructor. -
Method Summary
-
Constructor Details
-
PageNumberGenerator
public PageNumberGenerator(String format, int groupingSeparator, int groupingSize, int letterValue, String features, String language, String country) Main constructor. For further information on the parameters seeNumberConverter
.- 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 valuefeatures
- 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 Details
-
makeFormattedPageNumber
Formats a page number.- Parameters:
number
- page number to format- Returns:
- the formatted page number as a String
-