|
||||||||
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 | +--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.
Fields inherited from class jxl.biff.XFRecord |
biff7, biff8 |
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 |
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, getFormat, getFormatRecord, getNumberFormat, getOrientation, getPattern, getVerticalAlignment, getWrap, getXFIndex, hasBorders, hashCode, initialize, isDate, isInitialized, isLocked, isNumber, isRead, isShrinkToFit, 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(CellFormat format)
format
- the cell format to copypublic WritableCellFormat(jxl.biff.DisplayFormat format)
format
- the formatpublic WritableCellFormat(WritableFont font)
font
- the fontpublic WritableCellFormat(WritableFont font, jxl.biff.DisplayFormat format)
font
- the fontformat
- the date/number formatMethod Detail |
public void setAlignment(Alignment a) throws WriteException
setAlignment
in class jxl.write.biff.CellXFRecord
a
- the alignmentWriteException
- 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 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 setLocked(boolean l) throws WriteException
setLocked
in class jxl.write.biff.CellXFRecord
l
- the locked flagWriteException
- public void setOrientation(Orientation o) throws WriteException
setOrientation
in class jxl.write.biff.CellXFRecord
o
- the orientationWriteException
- public void setShrinkToFit(boolean s) throws WriteException
setShrinkToFit
in class jxl.write.biff.CellXFRecord
s
- shrink to fit flagWriteException
- public void setVerticalAlignment(VerticalAlignment va) throws WriteException
setVerticalAlignment
in class jxl.write.biff.CellXFRecord
va
- the vertical alignmentWriteException
- public void setWrap(boolean w) throws WriteException
setWrap
in class jxl.write.biff.CellXFRecord
w
- the wrap flagWriteException
-
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |