|
Spreadsheet Toolkit | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--corpus.excel.Component | +--corpus.excel.FormulaComponent | +--corpus.excel.CellReference
Used to store the internal representation of a referecnce to a single Cell in a Formula. Read up on R1C1-style range references. =A1+A2 if entered in B1 becomes =RC[-1]+R[1]C[-1] and =A3+A4 if entered in B3 becomes the same R1C1-style formula. =$A$1+A2 in B1 becomes =R1C1+R[1]C[-1]. R1C1-style addressing is ideal for spotting differences between formulas in different cells.
Field Summary | |
protected int[] |
coords
The coordinates of this cell 0: Column 1: Row 2: Depth of the worksheet that the cell being referred to is in. |
protected boolean[] |
dollars
Where the references of this cell absolute? |
protected java.lang.String |
excelref
The exact reference Excel gave this Cell. |
Fields inherited from class corpus.excel.FormulaComponent |
formula |
Fields inherited from class corpus.excel.Component |
haltOnErrors |
Constructor Summary | |
CellReference(int col,
int row,
boolean abs_col,
boolean abs_row,
java.lang.String excelref)
|
|
CellReference(int col,
int row,
int depth)
Creates a new CellReference for the Cell at Col x and Row y and Sheetdepth z. |
Method Summary | |
boolean |
absCol()
|
boolean |
absRow()
|
int |
getCol()
|
int |
getDepth()
|
Formula |
getFormula()
|
Cell |
getReferencedCell()
|
int |
getRow()
|
int |
length()
The length of the excel style reference as a string. |
static void |
main(java.lang.String[] args)
You should know what this does. |
void |
setAbsRel(boolean col,
boolean row)
|
void |
setDepth(int depth)
|
void |
setFormula(Formula newFormula)
Sets cells formula and creates Formula object. |
void |
setReferencedCell(Cell c)
|
void |
setSheetNames(java.lang.String[] sheetnames)
Sheetnames are used to determine cell depth during parsing. |
java.lang.String |
toHTMLString()
Converts information about this component into an HTML formatted String. |
java.lang.String |
toString()
Converts information about this cell into a String. |
Methods inherited from class corpus.excel.FormulaComponent |
getReferingFormula, parseTree |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.lang.String excelref
protected int[] coords
protected boolean[] dollars
Constructor Detail |
public CellReference(int col, int row, int depth)
public CellReference(int col, int row, boolean abs_col, boolean abs_row, java.lang.String excelref)
Method Detail |
public Cell getReferencedCell()
public void setReferencedCell(Cell c)
public int getCol()
public int getRow()
public int getDepth()
public void setDepth(int depth)
depth
- the new z position of the cell as an int.public boolean absCol()
public boolean absRow()
public void setAbsRel(boolean col, boolean row)
public void setFormula(Formula newFormula)
newFormula
- the new formula for the cell.public Formula getFormula()
public void setSheetNames(java.lang.String[] sheetnames)
public java.lang.String toString()
toString
in class Component
public java.lang.String toHTMLString()
toHTMLString
in class Component
public int length()
public static void main(java.lang.String[] args)
|
Spreadsheet Toolkit | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |