|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.Observable
net.sf.jga.swing.spreadsheet.Cell
public class Cell
A single cell in spreadsheet. Encapsulates information about the generator that provides the value of the cell, the cell's formatting information, and the editor and/or renderer used to display/update the cell's contents.
Copyright © 2004 David A. Hall
| Field Summary | |
|---|---|
static java.lang.String |
CIRCULAR_REF_ERR
|
static java.lang.String |
CLASS_CAST_ERR
|
static java.lang.String |
EVALUATION_ERR
|
static java.lang.String |
NULL_POINTER_ERR
|
static java.lang.String |
PARSER_ERR
|
static java.lang.String |
REFERENCE_ERR
|
static java.lang.String |
UNDEFINED_ERR
|
| Method Summary | ||
|---|---|---|
void |
clear()
Clears the contents of the cell, setting to the default type and value. |
|
java.util.Iterator<Cell> |
dependsOn()
|
|
java.awt.Point |
getAddress()
Returns the address of the cell. |
|
javax.swing.table.TableCellEditor |
getEditor()
Returns the component used to edit the cell |
|
java.lang.String |
getErrorMsg()
Returns the textual description of the last error associated with cell. |
|
java.lang.String |
getName()
|
|
Generator |
getReference()
Returns a reference to the cell's formula. |
|
GenericTableCellRenderer |
getRenderer()
Returns the renderer used to paint the cell |
|
java.lang.Class |
getType()
Returns the type of values held by the cell. |
|
java.lang.Object |
getValue()
Returns the value of the cell. |
|
boolean |
isEditable()
Returns true if the cell is editable, false if it is read-only. |
|
boolean |
isUndefined()
Returns true if the cell's value is undefined |
|
boolean |
isValid()
Returns true if the cell's value can be retrieved without error |
|
boolean |
references(Cell c)
Returns true if this cell references the given cell, either directly or indirectly. |
|
void |
setEditable(boolean b)
Sets the cell as editable (or not). |
|
void |
setEditor(javax.swing.table.TableCellEditor editor)
Sets the componenet used to edit the cell |
|
|
setFormat(UnaryFunctor<T,java.lang.String> formatter)
Sets the format of the cell. |
|
void |
setFormula(Generator formula)
Sets the contents of the cell to the given formula, notifying all observers of the change. |
|
void |
setFormula(java.lang.String formula)
Sets the contents of the cell to the given formula. |
|
void |
setName(java.lang.String name)
|
|
void |
setRenderer(GenericTableCellRenderer renderer)
Sets the component used to paint the cell |
|
java.lang.String |
toString()
|
|
void |
update(java.util.Observable observable,
java.lang.Object object)
|
|
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String CLASS_CAST_ERR
public static final java.lang.String EVALUATION_ERR
public static final java.lang.String CIRCULAR_REF_ERR
public static final java.lang.String NULL_POINTER_ERR
public static final java.lang.String REFERENCE_ERR
public static final java.lang.String UNDEFINED_ERR
public static final java.lang.String PARSER_ERR
| Method Detail |
|---|
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.Class getType()
public boolean isEditable()
public void setEditable(boolean b)
public java.awt.Point getAddress()
public GenericTableCellRenderer getRenderer()
public void setRenderer(GenericTableCellRenderer renderer)
public javax.swing.table.TableCellEditor getEditor()
public void setEditor(javax.swing.table.TableCellEditor editor)
public boolean isValid()
public boolean isUndefined()
public java.lang.String getErrorMsg()
public java.lang.Object getValue()
public void clear()
public final void setFormula(java.lang.String formula)
throws net.sf.jga.swing.spreadsheet.CircularReferenceException
net.sf.jga.swing.spreadsheet.CircularReferenceExceptionpublic final void setFormula(Generator formula)
public <T> void setFormat(UnaryFunctor<T,java.lang.String> formatter)
public Generator getReference()
public boolean references(Cell c)
public final java.util.Iterator<Cell> dependsOn()
public java.lang.String toString()
toString in class java.lang.Object
public void update(java.util.Observable observable,
java.lang.Object object)
update in interface java.util.Observer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||