jxl.write
Class WritableCellFormat

public class WritableCellFormat
extends CellXFRecord
A user specified cell format, which may be reused across many cells. The constructors takes parameters, such as font details and the numerical date formats, which specify to Excel how cells with this format should be displayed. Once a CellFormat has been added to a Cell which has been added to a sheet, then the CellFormat becomes immutable (to prevent unforeseen effects on other cells which share the same format). Attempts to call the various set... functions on a WritableCellFormat after this time will result in a runtime exception.
SinceNot specified.
VersionNot specified.
AuthorNot specified.
Wiki javadoc Use textile entry format.

done

Fields inherited from jxl.biffWritableRecordData
Fields inherited from jxl.biffXFRecord
Constructor Summary
WritableCellFormat()
A default constructor, which uses the default font and format.
WritableCellFormat( WritableFont font )
A CellFormat which specifies the font for cells with this format
WritableCellFormat( DisplayFormat format )
A constructor which specifies a date/number format for Cells which use this format object
WritableCellFormat( WritableFont font, DisplayFormat format )
A constructor which specifies the font and date/number format for cells which wish to use this format
WritableCellFormat( CellFormat format )
A public copy constructor which can be used for copy formats between different sheets
Method Summary
void setAlignment( Alignment a )
Sets the horizontal alignment for this format
void setBackground( Colour c )
Sets the background colour for this cell format
void setBackground( Colour c, Pattern p )
Sets the background colour and pattern for this cell format
void setBorder( Border b, BorderLineStyle ls )
Sets the specified border for this format
void setBorder( Border b, BorderLineStyle ls, Colour c )
Sets the specified border for this format
void setIndentation( int i )
Sets the indentation of the cell text
void setLocked( boolean l )
Sets whether or not this XF record locks the cell.
void setOrientation( Orientation o )
Sets the text orientation for this format
void setShrinkToFit( boolean s )
Sets the shrink to fit flag
void setVerticalAlignment( VerticalAlignment va )
Sets the vertical alignment for this format
void setWrap( boolean w )
Sets the wrap indicator for this format.
Methods inherited from jxl.biffByteData
Methods inherited from jxl.biffRecordData
Methods inherited from jxl.biffWritableRecordData
WritableCellFormat
public WritableCellFormat ( )
A default constructor, which uses the default font and format. This constructor should be used in conjunction with the more advanced two-phase methods setAlignment, setBorder etc.
Wiki javadoc Use textile entry format.
Add your comments here.
WritableCellFormat
public WritableCellFormat ( WritableFont font )
A CellFormat which specifies the font for cells with this format
Parameters
TypeNameDescription
WritableFont font the font
Wiki javadoc Use textile entry format.
Add your comments here.
WritableCellFormat
public WritableCellFormat ( DisplayFormat format )
A constructor which specifies a date/number format for Cells which use this format object
Parameters
TypeNameDescription
DisplayFormat format the format
Wiki javadoc Use textile entry format.
Add your comments here.
WritableCellFormat
public WritableCellFormat ( WritableFont font, DisplayFormat format )
A constructor which specifies the font and date/number format for cells which wish to use this format
Parameters
TypeNameDescription
WritableFont font the font
DisplayFormat format the date/number format
Wiki javadoc Use textile entry format.
Add your comments here.
WritableCellFormat
public WritableCellFormat ( CellFormat format )
A public copy constructor which can be used for copy formats between different sheets
Parameters
TypeNameDescription
CellFormat format the cell format to copy
Wiki javadoc Use textile entry format.

dfsdfdf

setAlignment
public void setAlignment ( Alignment a )
Sets the horizontal alignment for this format
Overrides method in CellXFRecord
Parameters
TypeNameDescription
Alignment a the alignment
Returns void No description provided.
Exceptions
WriteException No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setBackground
public void setBackground ( Colour c )
Sets the background colour for this cell format
Parameters
TypeNameDescription
Colour c the bacground colour
Returns void No description provided.
Exceptions
WriteException No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setBackground
public void setBackground ( Colour c, Pattern p )
Sets the background colour and pattern for this cell format
Overrides method in CellXFRecord
Parameters
TypeNameDescription
Colour c the colour
Pattern p the pattern
Returns void No description provided.
Exceptions
WriteException No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setBorder
public void setBorder ( Border b, BorderLineStyle ls )
Sets the specified border for this format
Parameters
TypeNameDescription
Border b the border
BorderLineStyle ls the border line style
Returns void No description provided.
Exceptions
WriteException No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setBorder
public void setBorder ( Border b, BorderLineStyle ls, Colour c )
Sets the specified border for this format
Overrides method in CellXFRecord
Parameters
TypeNameDescription
Border b the border
BorderLineStyle ls the border line style
Colour c the colour of the specified border
Returns void No description provided.
Exceptions
WriteException No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setIndentation
public void setIndentation ( int i )
Sets the indentation of the cell text
Overrides method in CellXFRecord
Parameters
TypeNameDescription
int i the indentation
Returns void No description provided.
Exceptions
WriteException No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setLocked
public void setLocked ( boolean l )
Sets whether or not this XF record locks the cell. For this to have any effect, the sheet containing cells with this format must also be locke3d
Overrides method in CellXFRecord
Parameters
TypeNameDescription
boolean l the locked flag
Returns void No description provided.
Exceptions
WriteException No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setOrientation
public void setOrientation ( Orientation o )
Sets the text orientation for this format
Overrides method in CellXFRecord
Parameters
TypeNameDescription
Orientation o the orientation
Returns void No description provided.
Exceptions
WriteException No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setShrinkToFit
public void setShrinkToFit ( boolean s )
Sets the shrink to fit flag
Overrides method in CellXFRecord
Parameters
TypeNameDescription
boolean s shrink to fit flag
Returns void No description provided.
Exceptions
WriteException No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setVerticalAlignment
public void setVerticalAlignment ( VerticalAlignment va )
Sets the vertical alignment for this format
Overrides method in CellXFRecord
Parameters
TypeNameDescription
VerticalAlignment va the vertical alignment
Returns void No description provided.
Exceptions
WriteException No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.
setWrap
public void setWrap ( boolean w )
Sets the wrap indicator for this format. If the wrap is set to TRUE, then Excel will wrap data in cells with this format so that it fits within the cell boundaries
Overrides method in CellXFRecord
Parameters
TypeNameDescription
boolean w the wrap flag
Returns void No description provided.
Exceptions
WriteException No description provided.
Wiki javadoc Use textile entry format.
Add your comments here.