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.
Method from jxl.write.WritableCellFormat Detail: |
public void setAlignment(Alignment a) throws WriteException {
super.setAlignment(a);
}
Sets the horizontal alignment for this format |
public void setBackground(Colour c) throws WriteException {
this.setBackground(c, Pattern.SOLID);
}
Sets the background colour for this cell format |
public void setBackground(Colour c,
Pattern p) throws WriteException {
super.setBackground(c, p);
}
Sets the background colour and pattern for this cell format |
public void setBorder(Border b,
BorderLineStyle ls) throws WriteException {
super.setBorder(b, ls, Colour.BLACK);
}
Sets the specified border for this format |
public void setBorder(Border b,
BorderLineStyle ls,
Colour c) throws WriteException {
super.setBorder(b, ls, c);
}
Sets the specified border for this format |
public void setIndentation(int i) throws WriteException {
super.setIndentation(i);
}
Sets the indentation of the cell text |
public void setLocked(boolean l) throws WriteException {
super.setLocked(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 |
public void setOrientation(Orientation o) throws WriteException {
super.setOrientation(o);
}
Sets the text orientation for this format |
public void setShrinkToFit(boolean s) throws WriteException {
super.setShrinkToFit(s);
}
Sets the shrink to fit flag |
public void setVerticalAlignment(VerticalAlignment va) throws WriteException {
super.setVerticalAlignment(va);
}
Sets the vertical alignment for this format |
public void setWrap(boolean w) throws WriteException {
super.setWrap(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 |