|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jxl.biff.RecordData | +--jxl.biff.WritableRecordData | +--jxl.biff.XFRecord
Holds an extended formatting record
Inner Class Summary | |
private static class |
XFRecord.BiffType
|
Field Summary | |
private Alignment |
align
The alignment for this cell (left, right, centre) |
private Colour |
backgroundColour
The background colour |
static XFRecord.BiffType |
biff7
|
static XFRecord.BiffType |
biff8
|
private XFRecord.BiffType |
biffType
The biff type |
private BorderLineStyle |
bottomBorder
The border indicator for the bottom of the cell |
private boolean |
copied
Flag to indicate whether this cell was copied. |
private boolean |
date
Indicates whether this is a date formatting record |
private java.text.DateFormat |
dateFormat
The date format for this record. |
private static int[] |
dateFormats
|
private Format |
excelFormat
The excel format for this record. |
private FontRecord |
font
The font object for this XF record |
private int |
fontIndex
The index to the font record used by this XF record |
private DisplayFormat |
format
The format object for this XF record. |
private int |
formatIndex
The index to the format record |
private boolean |
formatInfoInitialized
Flag to indicate whether the format information has been initialized. |
private FormattingRecords |
formattingRecords
A handle to the formatting records. |
private boolean |
hidden
Flag to indicate whether this XF record is hidden |
private boolean |
initialized
Flag to indicate whether this XF record has been initialized |
private static java.text.DateFormat[] |
javaDateFormats
|
private static java.text.NumberFormat[] |
javaNumberFormats
|
private BorderLineStyle |
leftBorder
The border indicator for the left of this cell |
private boolean |
locked
Flag to indicate whether this XF record represents a locked cell |
private boolean |
number
Indicates whether this is a number formatting record |
private java.text.NumberFormat |
numberFormat
The number format for this record. |
private static int[] |
numberFormats
|
private int |
options
The options mask which is used to store the processed cell options (such as alignment, borders etc) |
private Orientation |
orientation
The orientation of the cell |
private Pattern |
pattern
The background pattern |
private boolean |
read
Indicates whether this cell was constructed by an API or read from an existing Excel file |
private BorderLineStyle |
rightBorder
The border indicator for the right of the cell |
private BorderLineStyle |
topBorder
The border indicator for the top of the cell |
private VerticalAlignment |
valign
The vertical alignment for the cell (top, bottom, centre) |
private boolean |
wrap
Flag to indicates whether the data (normally text) in the cell will be wrapped around to fit in the cell width |
private int |
xfIndex
The index of this XF record within the workbook |
Fields inherited from class jxl.biff.RecordData |
code, record |
Constructor Summary | |
|
XFRecord(FontRecord fnt,
DisplayFormat form)
A constructor used when creating a writable record |
|
XFRecord(Record t,
XFRecord.BiffType bt)
Constructs this object from the raw data |
protected |
XFRecord(XFRecord fmt)
Copy constructor. |
Method Summary | |
boolean |
equals(java.lang.Object o)
Equals method. |
Alignment |
getAlignment()
Gets the horizontal cell alignment |
Colour |
getBackgroundColour()
Gets the background colour used by this cell |
BorderLineStyle |
getBorder(Border border)
Gets the line style for the given cell border If a border type of ALL or NONE is specified, then a line style of NONE is returned |
byte[] |
getData()
Converts the various fields into binary data. |
java.text.DateFormat |
getDateFormat()
Gets the java date format for this format record |
Font |
getFont()
Gets the font used by this format |
Format |
getFormat()
Gets the format used by this format |
int |
getFormatRecord()
Gets the lookup number of the format record |
protected boolean |
getHidden()
Accessor for the hidden flag |
protected boolean |
getLocked()
Accessor for the locked flag |
java.text.NumberFormat |
getNumberFormat()
Gets the java number format for this format record |
Orientation |
getOrientation()
Gets the orientation |
Pattern |
getPattern()
Gets the pattern used by this cell format |
VerticalAlignment |
getVerticalAlignment()
Gets the vertical cell alignment |
boolean |
getWrap()
Gets whether or not the contents of this cell are wrapped |
int |
getXFIndex()
Accessor for the XF index |
boolean |
hasBorders()
Determines if this cell format has any borders at all. |
void |
initialize(int pos,
FormattingRecords fr,
Fonts fonts)
If this cell has not been read in from an existing Excel sheet, then initializes this record with the XF index passed in. |
private void |
initializeFormatInformation()
Initializes the internal format information from the data read in |
boolean |
isDate()
Sees if this format is a date format |
boolean |
isInitialized()
Accessor to see if this format is initialized |
boolean |
isNumber()
Sees if this format is a number format |
boolean |
isRead()
Accessor to see if this format was read in. |
void |
setLocked(boolean l)
Sets whether or not this XF record locks the cell |
protected void |
setXFAlignment(Alignment a)
Sets the horizontal alignment for the data in this cell. |
protected void |
setXFBackground(Colour c,
Pattern p)
Sets the horizontal alignment for the data in this cell. |
protected void |
setXFBorder(Border b,
BorderLineStyle ls)
Sets the border for this cell This method should only be called from its writable subclass CellXFRecord |
protected void |
setXFCellOptions(int opt)
Sets the raw cell options |
protected void |
setXFOrientation(Orientation o)
Sets the vertical alignment for the data in this cell This method should only be called from its writable subclass CellXFRecord |
protected void |
setXFVerticalAlignment(VerticalAlignment va)
Sets the vertical alignment for the data in this cell This method should only be called from its writable subclass CellXFRecord |
protected void |
setXFWrap(boolean w)
Sets whether the data in this cell is wrapped This method should only be called from its writable subclass CellXFRecord |
void |
uninitialize()
Resets the initialize flag. |
Methods inherited from class jxl.biff.WritableRecordData |
getBytes |
Methods inherited from class jxl.biff.RecordData |
getCode, getRecord |
Methods inherited from class java.lang.Object |
|
Field Detail |
private int formatIndex
private boolean date
private boolean number
private java.text.DateFormat dateFormat
private java.text.NumberFormat numberFormat
private int fontIndex
private boolean locked
private boolean hidden
private Alignment align
private VerticalAlignment valign
private Orientation orientation
private boolean wrap
private BorderLineStyle leftBorder
private BorderLineStyle rightBorder
private BorderLineStyle topBorder
private BorderLineStyle bottomBorder
private Colour backgroundColour
private Pattern pattern
private int options
private int xfIndex
private FontRecord font
private DisplayFormat format
private boolean initialized
private boolean read
private Format excelFormat
private boolean formatInfoInitialized
private boolean copied
private FormattingRecords formattingRecords
private static int[] dateFormats
private static java.text.DateFormat[] javaDateFormats
private static int[] numberFormats
private static java.text.NumberFormat[] javaNumberFormats
public static final XFRecord.BiffType biff8
public static final XFRecord.BiffType biff7
private XFRecord.BiffType biffType
Constructor Detail |
public XFRecord(Record t, XFRecord.BiffType bt)
t
- the raw datapublic XFRecord(FontRecord fnt, DisplayFormat form)
fnt
- the fontform
- the formatprotected XFRecord(XFRecord fmt)
fmt
- XFRecordMethod Detail |
public java.text.DateFormat getDateFormat()
public java.text.NumberFormat getNumberFormat()
public int getFormatRecord()
public boolean isDate()
public boolean isNumber()
public byte[] getData()
getData
in class WritableRecordData
protected final boolean getLocked()
protected final boolean getHidden()
public final void setLocked(boolean l)
l
- the locked flagprotected final void setXFCellOptions(int opt)
opt
- the cell optionsprotected void setXFAlignment(Alignment a)
a
- the alignmentpublic Alignment getAlignment()
getAlignment
in interface CellFormat
public VerticalAlignment getVerticalAlignment()
getVerticalAlignment
in interface CellFormat
public Orientation getOrientation()
getOrientation
in interface CellFormat
protected void setXFBackground(Colour c, Pattern p)
c
- the background colourp
- the background patternpublic Colour getBackgroundColour()
getBackgroundColour
in interface CellFormat
public Pattern getPattern()
getPattern
in interface CellFormat
protected void setXFVerticalAlignment(VerticalAlignment va)
va
- the vertical alignmentprotected void setXFOrientation(Orientation o)
o
- the orientationprotected void setXFWrap(boolean w)
w
- the wrap flagpublic boolean getWrap()
getWrap
in interface CellFormat
protected void setXFBorder(Border b, BorderLineStyle ls)
b
- ls
- public BorderLineStyle getBorder(Border border)
getBorder
in interface CellFormat
border
- the cell border we are interested inpublic final boolean hasBorders()
hasBorders
in interface CellFormat
public final void initialize(int pos, FormattingRecords fr, Fonts fonts) throws NumFormatRecordsException
pos
- the xf index to initialize this record withfr
- the containing formatting recordsfonts
- the container for the fontsNumFormatRecordsException
- public final void uninitialize()
public final int getXFIndex()
public final boolean isInitialized()
public final boolean isRead()
public Format getFormat()
getFormat
in interface CellFormat
public Font getFont()
getFont
in interface CellFormat
private void initializeFormatInformation()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- object to compare
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |