Home » JCraft » jxl » write » [javadoc | source]
jxl.write
public class: WritableCellFormat [javadoc | source]
java.lang.Object
   jxl.biff.RecordData
      jxl.biff.WritableRecordData
         jxl.biff.XFRecord
            jxl.write.biff.CellXFRecord
               jxl.write.WritableCellFormat

All Implemented Interfaces:
    CellFormat, ByteData

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 jxl.biff.XFRecord:
formatIndex,  biff8,  biff7,  cell,  style
Fields inherited from jxl.biff.WritableRecordData:
maxRecordLength
Constructor:
 public WritableCellFormat() 
 public WritableCellFormat(WritableFont font) 
    A CellFormat which specifies the font for cells with this format
    Parameters:
    font - the font
 public WritableCellFormat(DisplayFormat format) 
    A constructor which specifies a date/number format for Cells which use this format object
    Parameters:
    format - the format
 public WritableCellFormat(CellFormat format) 
    A public copy constructor which can be used for copy formats between different sheets
    Parameters:
    format - the cell format to copy
 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:
    font - the font
    format - the date/number format
Method from jxl.write.WritableCellFormat Summary:
setAlignment,   setBackground,   setBackground,   setBorder,   setBorder,   setIndentation,   setLocked,   setOrientation,   setShrinkToFit,   setVerticalAlignment,   setWrap
Methods from jxl.write.biff.CellXFRecord:
setAlignment,   setBackground,   setBorder,   setIndentation,   setLocked,   setOrientation,   setShrinkToFit,   setVerticalAlignment,   setWrap
Methods from jxl.biff.XFRecord:
equals,   getAlignment,   getBackgroundColour,   getBorder,   getBorderColour,   getBorderLine,   getData,   getDateFormat,   getFont,   getFontIndex,   getFormat,   getFormatRecord,   getHidden,   getIndentation,   getLocked,   getNumberFormat,   getOrientation,   getPattern,   getVerticalAlignment,   getWrap,   getXFIndex,   hasBorders,   hashCode,   initialize,   isDate,   isInitialized,   isLocked,   isNumber,   isRead,   isShrinkToFit,   rationalize,   setFont,   setFontIndex,   setFormatIndex,   setXFAlignment,   setXFBackground,   setXFBorder,   setXFCellOptions,   setXFDetails,   setXFIndentation,   setXFIndex,   setXFLocked,   setXFOrientation,   setXFShrinkToFit,   setXFVerticalAlignment,   setXFWrap,   uninitialize
Methods from jxl.biff.WritableRecordData:
getBytes,   getData
Methods from jxl.biff.RecordData:
getCode,   getRecord
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from jxl.write.WritableCellFormat Detail:
 public  void setAlignment(Alignment a) throws WriteException 
    Sets the horizontal alignment for this format
 public  void setBackground(Colour c) throws WriteException 
    Sets the background colour for this cell format
 public  void setBackground(Colour c,
    Pattern p) throws WriteException 
    Sets the background colour and pattern for this cell format
 public  void setBorder(Border b,
    BorderLineStyle ls) throws WriteException 
    Sets the specified border for this format
 public  void setBorder(Border b,
    BorderLineStyle ls,
    Colour c) throws WriteException 
    Sets the specified border for this format
 public  void setIndentation(int i) throws WriteException 
    Sets the indentation of the cell text
 public  void setLocked(boolean l) throws WriteException 
    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 
    Sets the text orientation for this format
 public  void setShrinkToFit(boolean s) throws WriteException 
    Sets the shrink to fit flag
 public  void setVerticalAlignment(VerticalAlignment va) throws WriteException 
    Sets the vertical alignment for this format
 public  void setWrap(boolean w) throws WriteException 
    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