jxl.biff
Class Fonts
java.lang.Object
|
+--jxl.biff.Fonts
- Direct Known Subclasses:
- WritableFonts
- public class Fonts
- extends java.lang.Object
A container for the list of fonts used in this workbook
Field Summary |
private java.util.ArrayList |
fonts
The list of fonts |
private static int |
numDefaultFonts
The default number of fonts |
Constructor Summary |
Fonts()
Constructor |
Method Summary |
void |
addFont(FontRecord f)
Adds a font record to this workbook. |
FontRecord |
getFont(int index)
Used by FormattingRecord for retrieving the fonts for the
hardcoded styles |
(package private) IndexMapping |
rationalize()
Rationalizes all the fonts, removing any duplicates |
void |
write(File outputFile)
Writes out the list of fonts |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
fonts
private java.util.ArrayList fonts
- The list of fonts
numDefaultFonts
private static final int numDefaultFonts
- The default number of fonts
Fonts
public Fonts()
- Constructor
addFont
public void addFont(FontRecord f)
- Adds a font record to this workbook. If the FontRecord passed in has not
been initialized, then its font index is determined based upon the size
of the fonts list. The FontRecord's initialized method is called, and
it is added to the list of fonts.
- Parameters:
f
- the font to add
getFont
public FontRecord getFont(int index)
- Used by FormattingRecord for retrieving the fonts for the
hardcoded styles
- Parameters:
index
- the index of the font to return- Returns:
- the font with the specified font index
write
public void write(File outputFile)
throws java.io.IOException
- Writes out the list of fonts
- Parameters:
outputFile
- the compound file to write the data to- Throws:
java.io.IOException
-
rationalize
IndexMapping rationalize()
- Rationalizes all the fonts, removing any duplicates
- Returns:
- the mappings between new indexes and old ones