jxl.write.biff
Class FormulaRecord

java.lang.Object
  extended byjxl.biff.RecordData
      extended byjxl.biff.WritableRecordData
          extended byjxl.write.biff.CellValue
              extended byjxl.write.biff.FormulaRecord
All Implemented Interfaces:
ByteData, Cell, FormulaData, WritableCell
Direct Known Subclasses:
Formula

public class FormulaRecord
extends CellValue
implements FormulaData

A formula record. Parses the string passed in to deduce the set of formula records


Field Summary
 
Fields inherited from class jxl.biff.WritableRecordData
maxRecordLength
 
Constructor Summary
protected FormulaRecord(int c, int r, FormulaRecord fr)
          Copy constructor for writable formulas
protected FormulaRecord(int c, int r, jxl.write.biff.ReadFormulaRecord rfr)
          Copy constructor for formulas read in - invoked fromwritable formulas
  FormulaRecord(int c, int r, java.lang.String f)
          Constructor
  FormulaRecord(int c, int r, java.lang.String f, CellFormat st)
          Constructor
 
Method Summary
 WritableCell copyTo(int col, int row)
          A dummy implementation to keep the compiler quiet.
 java.lang.String getContents()
          Quick and dirty function to return the contents of this cell as a string.
 byte[] getData()
          Gets the binary data for output to file
 byte[] getFormulaData()
          Gets the raw bytes for the formula.
 CellType getType()
          Returns the content type of this cell
 
Methods inherited from class jxl.write.biff.CellValue
addCellFeatures, getCellFeatures, getCellFormat, getColumn, getRow, getSheet, getWritableCellFeatures, isHidden, removeComment, setCellFeatures, setCellFormat
 
Methods inherited from class jxl.biff.WritableRecordData
getBytes
 
Methods inherited from class jxl.biff.RecordData
getCode, getRecord
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jxl.Cell
getCellFeatures, getCellFormat, getColumn, getRow, isHidden
 

Constructor Detail

FormulaRecord

public FormulaRecord(int c,
                     int r,
                     java.lang.String f)
Constructor

Parameters:
f - the formula to copy

FormulaRecord

public FormulaRecord(int c,
                     int r,
                     java.lang.String f,
                     CellFormat st)
Constructor

Parameters:
f - the formula to copy

FormulaRecord

protected FormulaRecord(int c,
                        int r,
                        FormulaRecord fr)
Copy constructor for writable formulas

Parameters:
c - the column
r - the row
fr - the record to copy

FormulaRecord

protected FormulaRecord(int c,
                        int r,
                        jxl.write.biff.ReadFormulaRecord rfr)
Copy constructor for formulas read in - invoked fromwritable formulas

Parameters:
c - the column
r - the row
rfr - the formula data to copy
Method Detail

getData

public byte[] getData()
Gets the binary data for output to file

Overrides:
getData in class CellValue
Returns:
the binary data

getType

public CellType getType()
Returns the content type of this cell

Specified by:
getType in interface Cell
Returns:
the content type for this cell

getContents

public java.lang.String getContents()
Quick and dirty function to return the contents of this cell as a string. For more complex manipulation of the contents, it is necessary to cast this interface to correct subinterface

Specified by:
getContents in interface Cell
Returns:
the contents of this cell as a string

getFormulaData

public byte[] getFormulaData()
Gets the raw bytes for the formula. This will include the parsed tokens array

Specified by:
getFormulaData in interface FormulaData
Returns:
the raw record data

copyTo

public WritableCell copyTo(int col,
                           int row)
A dummy implementation to keep the compiler quiet. This object needs to be instantiated from ReadFormulaRecord

Specified by:
copyTo in interface WritableCell
Parameters:
col - the column which the new cell will occupy
row - the row which the new cell will occupy
Returns:
NOTHING