public interface Cell extends Comparable<Cell>, Extensible<Cell>, Serializable
The cell has content, which can be interpreted in different ways:
Modifier and Type | Method and Description |
---|---|
void |
addCellListener(CellListener listener)
Registers the given listener on the cell.
|
void |
clear()
Clears the content of the cell.
|
void |
copyFrom(Cell source)
Copies all data from the source cell to this one.
|
Address |
getAddress()
Returns the address of the cell.
|
CellListener[] |
getCellListeners()
Returns the listeners that have been registered on the cell.
|
String |
getContent()
Returns the content of the cell, as entered by the user.
|
SortedSet<Cell> |
getDependents()
Returns the dependents of the cell, i.e. the cells that contain a reference
to the cell in their formula.
|
Formula |
getFormula()
Returns an expression representing the cell's formula.
|
SortedSet<Cell> |
getPrecedents()
Returns the precedents of the cell, i.e. the cells that the
formula in the cell references.
|
Spreadsheet |
getSpreadsheet()
Returns the spreadsheet to which the cell belongs.
|
Value |
getValue()
Returns the value of the cell.
|
void |
moveFrom(Cell source)
Moves all data from the source cell to this one.
|
void |
removeCellListener(CellListener listener)
Removes the given listener from the cell.
|
void |
setContent(String content)
Sets the content of the cell and if it starts with the assignment operator
attempts to parse a formula from it.
|
compareTo
getExtension
Spreadsheet getSpreadsheet()
Address getAddress()
String getContent()
Formula getFormula()
void setContent(String content) throws FormulaCompilationException
FormulaCompilationException
- if an incorrectly formatted formula was enteredvoid clear()
SortedSet<Cell> getPrecedents()
SortedSet<Cell> getDependents()
void copyFrom(Cell source)
source
- the cell from which data should be copiedvoid moveFrom(Cell source)
source
- the cell from which data should be movedvoid addCellListener(CellListener listener)
listener
- the listener to be addedvoid removeCellListener(CellListener listener)
listener
- the listener to be removedCellListener[] getCellListeners()