|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jxl.biff.RecordData jxl.biff.WritableRecordData jxl.biff.XFRecord jxl.write.biff.CellXFRecord jxl.write.WritableCellFormat
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.
Field Summary |
Fields inherited from class jxl.biff.XFRecord |
biff7, biff8, formatIndex |
Constructor Summary | |
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 |
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 class jxl.biff.XFRecord |
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 |
Methods inherited from class jxl.biff.WritableRecordData |
getBytes |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
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 copyMethod Detail |
public void setAlignment(Alignment a) throws WriteException
a
- the alignment
WriteException
public void setVerticalAlignment(VerticalAlignment va) throws WriteException
va
- the vertical alignment
WriteException
public void setOrientation(Orientation o) throws WriteException
o
- the orientation
WriteException
public void setWrap(boolean w) throws WriteException
w
- the wrap flag
WriteException
public void setBorder(Border b, BorderLineStyle ls) throws WriteException
b
- the borderls
- the border line style
WriteException
public void setBorder(Border b, BorderLineStyle ls, Colour c) throws WriteException
b
- the borderls
- the border line stylec
- the colour of the specified border
WriteException
public void setBackground(Colour c) throws WriteException
c
- the bacground colour
WriteException
public void setBackground(Colour c, Pattern p) throws WriteException
c
- the colourp
- the pattern
WriteException
public void setShrinkToFit(boolean s) throws WriteException
s
- shrink to fit flag
WriteException
public void setIndentation(int i) throws WriteException
i
- the indentation
WriteException
public void setLocked(boolean l) throws WriteException
l
- the locked flag
WriteException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |