|
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.Cell
Used to store the internal representation of a Cell.
TODO:
Field Summary | |
protected int[] |
coords
The coordinates of this cell 0: Column 1: Row 2: Depth |
protected java.lang.String |
excelref
The exact reference Excel gave this Cell. |
protected java.lang.String |
formula
The formula in the cell. |
protected java.lang.String |
value
The value in the cell. |
Fields inherited from class corpus.excel.Component |
haltOnErrors |
Constructor Summary | |
Cell(int col,
int row)
Creates a new Cell at Col x and Row y |
|
Cell(int col,
int row,
java.lang.String value,
java.lang.String formula)
Creates a new Cell at Col x and Row y with a value and a formula (both as strings). |
|
Cell(int col,
int row,
java.lang.String value,
java.lang.String formula,
java.lang.String[] sheetnames)
Creates a new Cell at Col x and Row y with a value and a formula. |
Method Summary | |
boolean |
absCol()
|
boolean |
absRow()
|
void |
addReferredFrom(Cell r)
Add a cell that refers to this cell. |
void |
addReferTo(Cell r)
Add a cell that this Cell refers to. |
static int |
alphaTodig(java.lang.String in)
Special converter to change an Alpha style Excel reference into a Row number |
Grid |
ancestorTreeDepthDFS()
|
double |
angleBetweenDeg(Cell c2)
The angle between this cell and the parameter cell, as measured from a vertial line going up the screen from this cell. |
int[] |
anglesOutgoing(int size)
|
static void |
classification(Cell c)
Dumps the classification of the cell to System.out |
static java.lang.String |
classificationString(Cell c)
|
static java.lang.String |
digToalpha(int d)
Special converter to change a Excel row reference into a Alpha style reference |
void |
display()
Displays a window containing details about this particular cell. |
void |
display(WorkSheet ws)
Displays a window containing details about this particular cell. |
static double |
distanceBetween(Cell c1,
Cell c2)
|
double |
distanceFrom(Cell c2)
|
java.util.Vector |
getAllConnectedCells()
Traces all the cells that are in some way connected to the start cell. |
static java.util.Vector |
getAllConnectedCells(Cell start,
java.util.Vector visited)
Traces all the cells that are in some way connected to the start cell. |
java.util.Vector |
getAncestors()
Finds all the cells that refer to this cell. |
int |
getCol()
|
java.util.Vector |
getDescendents()
Finds all the cells that this cell refers to. |
static java.util.Vector |
getFamilyTree(Cell target)
Constructs an array of cells that are either dependent on the value in this cell or that this cell depends on. |
Formula |
getFormula()
|
java.lang.String |
getFormulaString()
|
java.lang.String |
getHTMLFormulaString()
|
java.awt.Point |
getPoint()
|
java.util.Vector |
getReferredFrom()
|
java.util.Iterator |
getReferredFromIterator()
|
java.util.Vector |
getReferTo()
|
java.util.Iterator |
getReferToIterator()
|
Cell |
getRelativeCell(WorkSheet ws,
int x,
int y)
Retrives the cell that is x columns and y rows relative from this cell. |
int |
getRow()
|
java.lang.String |
getValueString()
|
WorkSheet |
getWorkSheet()
|
boolean |
hasFormula()
|
boolean |
isCopyEquivalent(Cell c)
Copy-Equivalence exists, if the formulas are absolutely identical (i.e. the cell contents has been copied from one cell into the other, either by copy and paste, or by retyping the same formula). |
boolean |
isEmpty()
|
boolean |
isEndCell()
|
boolean |
isInBetween()
|
boolean |
isInput()
|
boolean |
isLogicallyEquivalent(Cell c)
2. |
boolean |
isOrphan()
|
boolean |
isPureCalculation()
|
boolean |
isRoot()
|
boolean |
isStructurallyEquivalent(Cell c)
3. |
boolean |
isTranslation()
|
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. |
static double |
ManhattanDistanceBetween(Cell c1,
Cell c2)
|
Formula |
process(java.lang.String[] sheetnames)
Given the sheetnames for this cell, create the Formula object. |
static void |
reference(Cell from,
Cell to)
The first cell (from) references the second cell(to). |
int |
referredFrom()
|
int |
referTo()
|
void |
setFormula(java.lang.String newFormula)
Sets cells formula and creates Formula object. |
void |
setSheetNames(java.lang.String[] sheetnames)
Sheetnames are used to determine cell depth during parsing. |
void |
setValue(java.lang.String newValue)
|
static Grid |
toGrid(Cell[] cells)
Converts an array of cells into a Grid. |
static Grid |
toGrid(java.util.Vector cells)
Converts an array of cells into a Grid. |
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. |
java.lang.String |
toStringBasic()
|
java.lang.String |
toStringRC()
Converts information about this cell into a String. |
int |
treeDepthDFS()
|
Grid |
treeGrid()
Creates a grid to display the individual tree. |
int |
treeMaxBreadthDFS()
|
java.lang.String |
treeToGraph()
Convert a dependency tree into a brace style format. |
java.lang.String |
treeToString()
Convert a dependency tree into a brace style format. |
static int[] |
xydistanceBetween(Cell c1,
Cell c2)
|
int[] |
xydistanceFrom(Cell c2)
|
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 java.lang.String value
protected java.lang.String formula
Constructor Detail |
public Cell(int col, int row)
public Cell(int col, int row, java.lang.String value, java.lang.String formula)
public Cell(int col, int row, java.lang.String value, java.lang.String formula, java.lang.String[] sheetnames)
Method Detail |
public Formula process(java.lang.String[] sheetnames) throws java.lang.Exception
java.lang.Exception
public int getCol()
public int getRow()
public java.awt.Point getPoint()
public boolean absCol()
public boolean absRow()
public void setValue(java.lang.String newValue)
newValue
- the new value for the cell.public void setFormula(java.lang.String newFormula)
newFormula
- the new formula for the cell.public Formula getFormula()
public boolean hasFormula()
public java.lang.String getValueString()
public java.lang.String getFormulaString()
public java.lang.String getHTMLFormulaString()
public WorkSheet getWorkSheet()
public void setSheetNames(java.lang.String[] sheetnames)
public Cell getRelativeCell(WorkSheet ws, int x, int y)
public static void reference(Cell from, Cell to)
public void addReferTo(Cell r)
r
- the cell referred to.public int referTo()
public java.util.Vector getReferTo()
public java.util.Iterator getReferToIterator()
public void addReferredFrom(Cell r)
r
- the refering cell.public int referredFrom()
public java.util.Vector getReferredFrom()
public java.util.Iterator getReferredFromIterator()
public boolean isOrphan()
public boolean isEmpty()
public boolean isInput()
public boolean isRoot()
public boolean isInBetween()
public boolean isEndCell()
public boolean isPureCalculation()
public boolean isTranslation()
public boolean isCopyEquivalent(Cell c)
public boolean isLogicallyEquivalent(Cell c)
public boolean isStructurallyEquivalent(Cell c)
public java.lang.String toString()
toString
in class Component
public java.lang.String toHTMLString()
toHTMLString
in class Component
public java.lang.String toStringRC()
public java.lang.String toStringBasic()
public double distanceFrom(Cell c2)
public static double distanceBetween(Cell c1, Cell c2)
public static double ManhattanDistanceBetween(Cell c1, Cell c2)
public int[] xydistanceFrom(Cell c2)
public static int[] xydistanceBetween(Cell c1, Cell c2)
public static int alphaTodig(java.lang.String in)
public static java.lang.String digToalpha(int d)
public int length()
public java.util.Vector getDescendents()
public java.util.Vector getAncestors()
public static java.util.Vector getFamilyTree(Cell target)
public java.util.Vector getAllConnectedCells()
public static java.util.Vector getAllConnectedCells(Cell start, java.util.Vector visited)
public static Grid toGrid(Cell[] cells)
public static Grid toGrid(java.util.Vector cells)
public Grid treeGrid()
public int treeDepthDFS()
public Grid ancestorTreeDepthDFS()
public int treeMaxBreadthDFS()
public java.lang.String treeToString()
public java.lang.String treeToGraph()
public int[] anglesOutgoing(int size)
public double angleBetweenDeg(Cell c2)
public void display()
public void display(WorkSheet ws)
public static void main(java.lang.String[] args)
public static java.lang.String classificationString(Cell c)
public static void classification(Cell c)
|
Spreadsheet Toolkit | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |