public class WritableCellFormat
extends jxl.write.biff.CellXFRecord
Constructor and Description |
---|
WritableCellFormat()
A default constructor, which uses the default font and format.
|
WritableCellFormat(CellFormat format)
A public copy constructor which can be used for copy formats between
different sheets
|
WritableCellFormat(jxl.biff.DisplayFormat format)
A constructor which specifies a date/number format for Cells which
use this format object
|
WritableCellFormat(WritableFont font)
A CellFormat which specifies the font for cells with this format
|
WritableCellFormat(WritableFont font,
jxl.biff.DisplayFormat format)
A constructor which specifies the font and date/number format for cells
which wish to use this format
|
Modifier and Type | Method and Description |
---|---|
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.
|
equals, getAlignment, getBackgroundColour, getBorder, getBorderColour, getBorderLine, getData, getDateFormat, getFont, getFontIndex, getFormat, getFormatRecord, getIndentation, getNumberFormat, getOrientation, getPattern, getVerticalAlignment, getWrap, getXFIndex, hasBorders, hashCode, initialize, isDate, isInitialized, isLocked, isNumber, isRead, isShrinkToFit, setFont, uninitialize
public WritableCellFormat()
public WritableCellFormat(WritableFont font)
font
- the fontpublic WritableCellFormat(jxl.biff.DisplayFormat format)
format
- the formatpublic WritableCellFormat(WritableFont font, jxl.biff.DisplayFormat format)
font
- the fontformat
- the date/number formatpublic WritableCellFormat(CellFormat format)
format
- the cell format to copypublic void setAlignment(Alignment a) throws WriteException
setAlignment
in class jxl.write.biff.CellXFRecord
a
- the alignmentWriteException
public void setVerticalAlignment(VerticalAlignment va) throws WriteException
setVerticalAlignment
in class jxl.write.biff.CellXFRecord
va
- the vertical alignmentWriteException
public void setOrientation(Orientation o) throws WriteException
setOrientation
in class jxl.write.biff.CellXFRecord
o
- the orientationWriteException
public void setWrap(boolean w) throws WriteException
setWrap
in class jxl.write.biff.CellXFRecord
w
- the wrap flagWriteException
public void setBorder(Border b, BorderLineStyle ls) throws WriteException
b
- the borderls
- the border line styleWriteException
public void setBorder(Border b, BorderLineStyle ls, Colour c) throws WriteException
setBorder
in class jxl.write.biff.CellXFRecord
b
- the borderls
- the border line stylec
- the colour of the specified borderWriteException
public void setBackground(Colour c) throws WriteException
c
- the bacground colourWriteException
public void setBackground(Colour c, Pattern p) throws WriteException
setBackground
in class jxl.write.biff.CellXFRecord
c
- the colourp
- the patternWriteException
public void setShrinkToFit(boolean s) throws WriteException
setShrinkToFit
in class jxl.write.biff.CellXFRecord
s
- shrink to fit flagWriteException
public void setIndentation(int i) throws WriteException
setIndentation
in class jxl.write.biff.CellXFRecord
i
- the indentationWriteException
public void setLocked(boolean l) throws WriteException
setLocked
in class jxl.write.biff.CellXFRecord
l
- the locked flagWriteException