jet.report.xls
Class Formula

java.lang.Object
  extended by Biff
      extended by jet.report.xls.Blank
          extended by jet.report.xls.Formula

public class Formula
extends Blank

Description: Constant floating point number Record Body Length: 15 bytes Record Body Byte Structure: Byte Number Name Contents (hex) 0-1 rw Row 2-3 col Column 4-5 ixfe Index of Xf record 6-13 num Current value of formula(IEEE format) 14-15 grbit Option flags 16-19 chn 20-21 cce Length of the parsed expression 22- rgce Parsed expression A Formula class extends Blank class.


Field Summary
static short ALWAYSCALC
           
static short CALCONLOAD
           
static short SHRFMLA
           
 
Fields inherited from class jet.report.xls.Blank
META
 
Constructor Summary
Formula(int row, int col, int ixfe, double num, short grbit, byte[] rgce)
          Constructs a Number record and sets its fields appropriately.
Formula(int row, int col, int ixfe, double num, short grbit, java.lang.String formulaStr)
          Constructs a Number record and sets its fields appropriately.
 
Method Summary
 java.lang.String getFormulaStr()
          get formula string .
 int getLength()
           
 void input(RandomAccessStream stream)
          input class Number from input stream
 boolean isAlwaysCalc()
          get always calculate the formula string or not.
 boolean isCalcOnLoad()
          get calculate the formula string when load it or not.
 boolean isShrFmla()
          get the formula string is share formula or not.
 int opcode()
          get the opcode of Number.
 int output(RandomAccessStream stream)
          output class Number
 void setAlwaysCalc(boolean b)
          set always calculate the formula string or not.
 void setCalcOnLoad(boolean b)
          set calculate the formula string when load it or not.
 void setFormulaStr(java.lang.String str)
          set formula string .
 void setShrFmla(boolean b)
          set the formula string is share formula or not.
 
Methods inherited from class jet.report.xls.Blank
getCol, getIxfe, getRow, setCol, setIxfe, setRow
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALWAYSCALC

public static final short ALWAYSCALC
See Also:
Constant Field Values

CALCONLOAD

public static final short CALCONLOAD
See Also:
Constant Field Values

SHRFMLA

public static final short SHRFMLA
See Also:
Constant Field Values
Constructor Detail

Formula

public Formula(int row,
               int col,
               int ixfe,
               double num,
               short grbit,
               byte[] rgce)
Constructs a Number record and sets its fields appropriately.

Parameters:
row - The row number to locate the formula(based 0)
col - The column number to locate the formula(based 0)
ixfe - Index to the Xf record
num - The current value of the formula
grbit - Option flags, ALWAYSCALC, CALCONLOAD, SHRFMLA or combine of them
rgce - The byte array to express the formula.

Formula

public Formula(int row,
               int col,
               int ixfe,
               double num,
               short grbit,
               java.lang.String formulaStr)
Constructs a Number record and sets its fields appropriately.

Parameters:
row - The row number to locate the formula(based 0)
col - The column number to locate the formula(based 0)
ixfe - Index to the Xf record
num - The current value of the formula
grbit - Option flags, ALWAYSCALC, CALCONLOAD, SHRFMLA or combine of them
formulaStr - The formula string (refer to excel formula).
Method Detail

opcode

public final int opcode()
get the opcode of Number.

Overrides:
opcode in class Blank

output

public int output(RandomAccessStream stream)
           throws java.io.IOException
output class Number

Overrides:
output in class Blank
Throws:
java.io.IOException

input

public void input(RandomAccessStream stream)
           throws java.io.IOException
input class Number from input stream

Overrides:
input in class Blank
Throws:
java.io.IOException

getLength

public int getLength()

setFormulaStr

public void setFormulaStr(java.lang.String str)
set formula string .


getFormulaStr

public java.lang.String getFormulaStr()
get formula string .


setAlwaysCalc

public void setAlwaysCalc(boolean b)
set always calculate the formula string or not.

Parameters:
b - Always calculate the formula string or not

isAlwaysCalc

public boolean isAlwaysCalc()
get always calculate the formula string or not.

Returns:
Always calculate the formula string or not

setCalcOnLoad

public void setCalcOnLoad(boolean b)
set calculate the formula string when load it or not.

Parameters:
b - Calculate the formula string when load it or not

isCalcOnLoad

public boolean isCalcOnLoad()
get calculate the formula string when load it or not.

Returns:
Calculate the formula string when load it or not

setShrFmla

public void setShrFmla(boolean b)
set the formula string is share formula or not.

Parameters:
b - The formula string is share formula or not.

isShrFmla

public boolean isShrFmla()
get the formula string is share formula or not.

Returns:
The formula string is share formula or not.