|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jxl.biff.FormattingRecords
The list of XF records and formatting records for the workbook
Field Summary | |
private static int |
customFormatStartIndex
The start index number for custom format records |
private Fonts |
fonts
A handle to the available fonts |
private java.util.HashMap |
formats
A hash map of FormatRecords, for random access retrieval when reading in a spreadsheet |
private java.util.ArrayList |
formatsList
A list of formats, used when writing out a spreadsheet |
private static int |
maxFormatRecordsIndex
The maximum number of format records. |
private static int |
minXFRecords
The minimum number of XF records for a sheet. |
private int |
nextCustomIndexNumber
The next available index number for custom format records |
private PaletteRecord |
palette
The colour palette |
private java.util.ArrayList |
xfRecords
The list of extended format records |
Constructor Summary | |
FormattingRecords(Fonts f)
Constructor |
Method Summary | |
void |
addFormat(DisplayFormat fr)
Adds a cell format to the hash map, keyed on its index. |
void |
addStyle(XFRecord xf)
Adds an extended formatting record to the list. |
java.text.DateFormat |
getDateFormat(int pos)
Gets the DateFormat used to format the cell. |
protected Fonts |
getFonts()
Accessor for the fonts used by this workbook |
(package private) FormatRecord |
getFormatRecord(int index)
Gets the format record |
java.text.NumberFormat |
getNumberFormat(int pos)
Gets the NumberFormat used to format the cell. |
protected int |
getNumberOfFormatRecords()
Gets the number of formatting records on the list. |
PaletteRecord |
getPalette()
Accessor for the colour palette |
XFRecord |
getXFRecord(int index)
Gets the XFRecord for the specified index. |
boolean |
isDate(int pos)
Sees if the extended formatting record at the specified position represents a date. |
IndexMapping |
rationalize(IndexMapping fontMapping,
IndexMapping formatMapping)
Rationalizes the cell formats. |
IndexMapping |
rationalizeDisplayFormats()
Rationalizes the display formats. |
IndexMapping |
rationalizeFonts()
|
void |
setColourRGB(Colour c,
int r,
int g,
int b)
Sets the RGB value for the specified colour for this workbook |
void |
setPalette(PaletteRecord pr)
Called from the WorkbookParser to set the colour palette |
void |
write(File outputFile)
Writes out all the format records and the XF records |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.util.HashMap formats
private java.util.ArrayList formatsList
private java.util.ArrayList xfRecords
private int nextCustomIndexNumber
private Fonts fonts
private PaletteRecord palette
private static final int customFormatStartIndex
private static final int maxFormatRecordsIndex
private static final int minXFRecords
Constructor Detail |
public FormattingRecords(Fonts f)
f
- the container for the fontsMethod Detail |
public final void addStyle(XFRecord xf) throws NumFormatRecordsException
xf
- the xf record to addNumFormatRecordsException
- public final void addFormat(DisplayFormat fr) throws NumFormatRecordsException
fr
- the format recordpublic final boolean isDate(int pos)
pos
- the xf format indexpublic final java.text.DateFormat getDateFormat(int pos)
pos
- the xf format indexpublic final java.text.NumberFormat getNumberFormat(int pos)
pos
- the xf format indexFormatRecord getFormatRecord(int index)
index
- public void write(File outputFile) throws java.io.IOException
outputFile
- the file to write tojava.io.IOException
- protected final Fonts getFonts()
public final XFRecord getXFRecord(int index)
index
- the XF record to retrieveprotected final int getNumberOfFormatRecords()
public IndexMapping rationalizeFonts()
public IndexMapping rationalize(IndexMapping fontMapping, IndexMapping formatMapping)
public IndexMapping rationalizeDisplayFormats()
im
- the index mapping for the font rationalizationpublic PaletteRecord getPalette()
public void setPalette(PaletteRecord pr)
p
- the palettepublic void setColourRGB(Colour c, int r, int g, int b)
c
- the colour whose RGB value is to be overwrittenr
- the red portion to set (0-255)g
- the green portion to set (0-255)b
- the blue portion to set (0-255)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |