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

All Implemented Interfaces:
    CellFormat, ByteData

Direct Known Subclasses:
    WritableCellFormat, StyleXFRecord, CellXFRecord

Holds an extended formatting record
Field Summary
public  int formatIndex    The index to the format record 
public static final  BiffType biff8     
public static final  BiffType biff7     
protected static final  XFType cell     
protected static final  XFType style     
Fields inherited from jxl.biff.WritableRecordData:
maxRecordLength
Constructor:
 protected XFRecord(XFRecord fmt) 
    Copy constructor. Used for copying writable formats, typically when duplicating formats to handle merged cells
    Parameters:
    fmt - XFRecord
 protected XFRecord(CellFormat cellFormat) 
    A public copy constructor which can be used for copy formats between different sheets. Unlike the the other copy constructor, this version does a deep copy
    Parameters:
    cellFormat - the format to copy
 public XFRecord(FontRecord fnt,
    DisplayFormat form) 
    A constructor used when creating a writable record
    Parameters:
    fnt - the font
    form - the format
 public XFRecord(Record t,
    WorkbookSettings ws,
    BiffType bt) 
    Constructs this object from the raw data
    Parameters:
    t - the raw data
    bt - the biff type
Method from jxl.biff.XFRecord Summary:
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.biff.XFRecord Detail:
 public boolean equals(Object o) 
    Equals method. This is called when comparing writable formats in order to prevent duplicate formats being added to the workbook
 public Alignment getAlignment() 
    Gets the horizontal cell alignment
 public Colour getBackgroundColour() 
    Gets the background colour used by this cell
 public BorderLineStyle getBorder(Border border) 
    Gets the line style for the given cell border If a border type of ALL or NONE is specified, then a line style of NONE is returned
 public Colour getBorderColour(Border border) 
    Gets the line style for the given cell border If a border type of ALL or NONE is specified, then a line style of NONE is returned
 public BorderLineStyle getBorderLine(Border border) 
    Gets the line style for the given cell border If a border type of ALL or NONE is specified, then a line style of NONE is returned
 public byte[] getData() 
    Converts the various fields into binary data. If this object has been read from an Excel file rather than being requested by a user (ie. if the read flag is TRUE) then no processing takes place and the raw data is simply returned.
 public DateFormat getDateFormat() 
    Gets the java date format for this format record
 public Font getFont() 
    Gets the font used by this format
 public int getFontIndex() 
    Accessor for the font index. Called by the FormattingRecords objects during the rationalization process
 public Format getFormat() 
    Gets the format used by this format
 public int getFormatRecord() 
    Gets the lookup number of the format record
 protected final boolean getHidden() 
    Accessor for the hidden flag
 public int getIndentation() 
    Gets the indentation
 protected final boolean getLocked() 
    Accessor for the locked flag
 public NumberFormat getNumberFormat() 
    Gets the java number format for this format record
 public Orientation getOrientation() 
    Gets the orientation
 public Pattern getPattern() 
    Gets the pattern used by this cell format
 public VerticalAlignment getVerticalAlignment() 
    Gets the vertical cell alignment
 public boolean getWrap() 
    Gets whether or not the contents of this cell are wrapped
 public final int getXFIndex() 
    Accessor for the XF index
 public final boolean hasBorders() 
    Determines if this cell format has any borders at all. Used to set the new borders when merging a group of cells
 public int hashCode() 
    Standard hash code implementation
 public final  void initialize(int pos,
    FormattingRecords fr,
    Fonts fonts) throws NumFormatRecordsException 
    If this cell has not been read in from an existing Excel sheet, then initializes this record with the XF index passed in. Calls initialized on the font and format record
 public boolean isDate() 
    Sees if this format is a date format
 public final boolean isInitialized() 
    Accessor to see if this format is initialized
 public boolean isLocked() 
    Accessor for whether a particular cell is locked
 public boolean isNumber() 
    Sees if this format is a number format
 public final boolean isRead() 
    Accessor to see if this format was read in. Used when checking merged cells
 public boolean isShrinkToFit() 
    Gets the shrink to fit flag
  void rationalize(IndexMapping xfMapping) 
    Changes the appropriate indexes during the rationalization process
 public  void setFont(FontRecord f) 
    Sets the font object with a workbook specific clone. Called from the CellValue object when the font has been identified as a statically shared font Also called to superimpose a HyperlinkFont on an existing label cell
  void setFontIndex(int newindex) 
    Sets the font index. This is called during the rationalization process when some of the duplicate fonts have been removed
  void setFormatIndex(int newindex) 
    Sets the format index. This is called during the rationalization process when some of the duplicate number formats have been removed
 protected  void setXFAlignment(Alignment a) 
    Sets the horizontal alignment for the data in this cell. This method should only be called from its writable subclass CellXFRecord
 protected  void setXFBackground(Colour c,
    Pattern p) 
    Sets the horizontal alignment for the data in this cell. This method should only be called from its writable subclass CellXFRecord
 protected  void setXFBorder(Border b,
    BorderLineStyle ls,
    Colour c) 
    Sets the border for this cell This method should only be called from its writable subclass CellXFRecord
 protected final  void setXFCellOptions(int opt) 
    Sets the cell options
 protected  void setXFDetails(XFType t,
    int pf) 
    Sets the format type and parent format from the writable subclass
 protected  void setXFIndentation(int i) 
    Sets the indentation
 final  void setXFIndex(int xfi) 
    Sets the XF index. Called when rationalizing the XF records immediately prior to writing
 protected final  void setXFLocked(boolean l) 
    Sets whether or not this XF record locks the cell
 protected  void setXFOrientation(Orientation o) 
    Sets the vertical alignment for the data in this cell This method should only be called from its writable subclass CellXFRecord
 protected  void setXFShrinkToFit(boolean s) 
    Sets the shrink to fit flag
 protected  void setXFVerticalAlignment(VerticalAlignment va) 
    Sets the vertical alignment for the data in this cell This method should only be called from its writable subclass CellXFRecord
 protected  void setXFWrap(boolean w) 
    Sets whether the data in this cell is wrapped This method should only be called from its writable subclass CellXFRecord
 public final  void uninitialize() 
    Resets the initialize flag. This is called by the constructor of WritableWorkbookImpl to reset the statically declared fonts