|
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.WorkSheet
Used to store the internal representation of an excel file. This will be the data that is used to display the worksheet.
Field Summary |
Fields inherited from class corpus.excel.Component |
haltOnErrors |
Constructor Summary | |
WorkSheet(java.lang.String name,
int depth,
java.util.Vector values,
java.util.Vector formulas,
int startCol,
int startRow,
WorkBook parent)
This constructor is mainly for IBM Excelaccessor. |
|
WorkSheet(java.lang.String name,
int depth,
WorkBook parent)
Constructor used by JExcelRead |
Method Summary | |
java.util.Vector |
averageFormaula()
Returns a Vector with the average formula (represented by a MathVector) for each cell. |
Grid |
cellGrid()
A grid version of the cells in this worksheet. |
void |
createCellGrid()
Create Cell Grid, turns the values and formula grids into a cell grid. |
int |
emptyCells()
Finds the number of empty cells |
double[] |
findCenter()
Finds the numerical center for this WorkSheet based on the Row and Column positions for all occupied cells. |
int |
formulaCells()
Finds the number of cells that contain a formula. |
Grid |
formulaGrid()
A Grid of Strings for the formula in each cell. |
java.lang.String |
functionCatagory(boolean header)
Breaks down the functions used into catagories. |
int[] |
getAngles(int size)
Counts outgoing vector angles for all the cells in this WorkSheet into buckets. |
Cell |
getCell(int col,
int row)
Returns the cell from this WorkSheet at position col, row. |
Cell[] |
getCycleCells()
Searches the worksheet for circular references. |
int |
getDepth()
Returns the Depth in the WorkBook that this WorkSheet is at. |
Function[] |
getFunctions()
Find all the Functions used in the WorkSheet. |
Cell[] |
getLeafCells()
Looks for cells that reference other cells but are not referenced by any cells themselves. |
int |
getMaxHeight()
Returns the max column that contains a cell. |
int |
getMaxWidth()
Returns the max column that contains a cell. |
java.lang.String |
getName()
Returns the sheetname for this WorkBook. |
WorkBook |
getParent()
Returns the WorkBook that contains this WorkSheet. |
Cell[] |
getRootCells()
Looks for cells that are referenced by other cells but do not reference any cells. |
java.util.HashMap |
inDegree()
Referencing in degree for each cell. |
int[][] |
inOutDegree()
Degree of in and out bound refereces for each cell. |
java.util.HashMap |
inOutDegreeHashMap()
Referencing in and out degree for each cell. |
boolean |
isEmpty()
Is this WorkSheet Empty? |
Cell[] |
localFormulas()
Finds cells that contain formulas but do not reference other cells. |
int |
maxTreeBreadth()
Find the maximum breadth of dependency tree from the root cells. |
int |
maxTreeBreadth(Cell[] cells)
Find the maximum breadth of dependency tree from the given cells. |
int |
maxTreeDepth()
Find the maximum depth of dependency tree from all root cells. |
int |
maxTreeDepth(Cell[] cells)
Find the maximum depth of dependency tree from the given cells. |
java.lang.String |
metricsAngles(boolean header)
Breaks down the outgoing angles for all the cells in the worksheet. |
java.lang.String |
metricsFunctionCatagory(boolean header)
Breaks down the functions used into catagories at a sheet level. |
java.util.Map |
metricsFunctionCatagory(java.util.Map map,
boolean header)
Returns a Map with a count to the number of times each Function occurs. |
int |
occupiedCells()
Finds the number of occupied cells. |
int |
orphanCells()
Returns the number of cells in the worksheet with no incoming or outgoing references |
java.util.HashMap |
outDegree()
Referencing out degree for each cell. |
void |
print()
Like toString except dumps to console. |
void |
process()
Process the worksheet This method is called after reading has been completed. |
void |
setCell(Cell c)
Adds/changes a cell in the worksheet. |
void |
setDetails(int depth,
java.lang.String name)
Assign the depth and name of the worksheet in the workbook. |
void |
setFormula(int col,
int row,
java.lang.String formula)
Adds/changes a Formula in the worksheet. |
void |
setParent(WorkBook parent)
Sets the WorkBook that contains this WorkSheet. |
void |
setSheetNames(java.lang.String[] sheetnames)
Set sheetnames |
void |
setValue(int col,
int row,
java.lang.String value)
Adds/changes a value in the worksheet. |
Grid |
toFormulaGrid()
A grid containing all the formula. |
java.lang.String |
toHTMLString()
Converts information about this component into an HTML formatted String. |
java.lang.String |
toString()
Print String version. |
int[] |
totalInOutDegree()
Find a count for all in[0] and out[1] bound references in this WorkSheet. |
int[] |
totalInOutDegree(int[][] inOut)
Sums up all in and out bound references for inOut. |
java.lang.String |
treeToString()
Convert the dependency tree into a file, used for fisheye views. |
Grid |
valueGrid()
A grid of Strings for the value in each cell. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public WorkSheet(java.lang.String name, int depth, WorkBook parent)
public WorkSheet(java.lang.String name, int depth, java.util.Vector values, java.util.Vector formulas, int startCol, int startRow, WorkBook parent)
Method Detail |
public void setValue(int col, int row, java.lang.String value)
public void setFormula(int col, int row, java.lang.String formula)
public void setCell(Cell c)
public java.lang.String getName()
public int getDepth()
public void setParent(WorkBook parent)
parent
- The workbook that contains this worksheet.public WorkBook getParent()
public int getMaxWidth()
public int getMaxHeight()
public Cell getCell(int col, int row)
public Grid valueGrid()
public Grid formulaGrid()
public Grid cellGrid()
public Grid toFormulaGrid()
public void setDetails(int depth, java.lang.String name)
depth
- The depthname
- The namepublic void setSheetNames(java.lang.String[] sheetnames)
sheetnames
- The names of the worksheets.public void createCellGrid()
public void process()
public Cell[] getRootCells()
public int maxTreeDepth()
public int maxTreeDepth(Cell[] cells)
public int maxTreeBreadth()
public int maxTreeBreadth(Cell[] cells)
public Cell[] getLeafCells()
public Cell[] getCycleCells()
public int orphanCells()
public int emptyCells()
public int occupiedCells()
public int formulaCells()
public Function[] getFunctions()
Function
public boolean isEmpty()
public Cell[] localFormulas()
public int[] totalInOutDegree()
totalInOutDegree(int[][])
,
inOutDegree()
public int[] totalInOutDegree(int[][] inOut)
inOut
- An int[][] where the first index is a count and the second is
either an in[0] or out[1] bound reference count.
totalInOutDegree()
,
inOutDegree()
public int[][] inOutDegree()
public java.util.HashMap inOutDegreeHashMap()
public java.util.HashMap inDegree()
public java.util.HashMap outDegree()
public double[] findCenter()
public int[] getAngles(int size)
size
- The number of buckets to divide 360 Degrees into.
Cell.anglesOutgoing(int)
public java.util.Vector averageFormaula()
public java.util.Map metricsFunctionCatagory(java.util.Map map, boolean header)
public java.lang.String metricsFunctionCatagory(boolean header)
public java.lang.String functionCatagory(boolean header)
public java.lang.String metricsAngles(boolean header)
public java.lang.String treeToString()
public java.lang.String toString()
toString
in class Component
public java.lang.String toHTMLString()
toHTMLString
in class Component
public void print()
|
Spreadsheet Toolkit | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |